T_constant_encapsed_string

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Yew12
    New Member
    • Mar 2008
    • 23

    T_constant_encapsed_string

    I'm hoping some one will know where I've gone wrong with the following.

    [PHP]<?php

    putenv("TNS_ADM IN=/u1/oracle/Produdcts/shu10g/network/admin");

    $con = OCIlogon("Usern ame","Password" ,"shu10g");

    $query "Begin p_room_content( 1,1,:var_room_i d, :var_fixture_id , :var_fixture_de scription); End; ";

    $stmt = OCIParse($con, $query) or die ('Can not parse query');

    OCIBindByName($ stmt,":var_room _id", &$room_id,4) or die ('Cannot bind variable');

    OCIBindByName($ stmt,":var_fixt ure_id", &$fixture_id ,4) or die ('Can not bind variable');

    OCIBindByName($ stmt,":var_fixt ure_description ", &$fixture_descr iption,25) or die ('Can not bind variable');

    OCIExecute($stm t) or die ('Cannot Execute statement');

    OCIFreeStatemen t($stmt);

    OCILogoff($con) ;

    Echo "$room_id $fixture_id $fixture_descri ption ";

    ?>[/PHP]
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    Originally posted by Yew12
    I'm hoping some one will know where I've gone wrong with the following.

    [PHP]<?php

    putenv("TNS_ADM IN=/u1/oracle/Produdcts/shu10g/network/admin");

    $con = OCIlogon("Usern ame","Password" ,"shu10g");

    $query "Begin p_room_content( 1,1,:var_room_i d, :var_fixture_id , :var_fixture_de scription); End; ";

    $stmt = OCIParse($con, $query) or die ('Can not parse query');

    OCIBindByName($ stmt,":var_room _id", &$room_id,4) or die ('Cannot bind variable');

    OCIBindByName($ stmt,":var_fixt ure_id", &$fixture_id ,4) or die ('Can not bind variable');

    OCIBindByName($ stmt,":var_fixt ure_description ", &$fixture_descr iption,25) or die ('Can not bind variable');

    OCIExecute($stm t) or die ('Cannot Execute statement');

    OCIFreeStatemen t($stmt);

    OCILogoff($con) ;

    Echo "$room_id $fixture_id $fixture_descri ption ";

    ?>[/PHP]
    When you receive an error you are given the line number on which the error occured; it's helpful to know which line.

    Regards

    Comment

    • TheServant
      Recognized Expert Top Contributor
      • Feb 2008
      • 1168

      #3
      Originally posted by markusn00b
      When you receive an error you are given the line number on which the error occured; it's helpful to know which line.

      Regards
      And what error it says it has.

      Comment

      • Markus
        Recognized Expert Expert
        • Jun 2007
        • 6092

        #4
        Originally posted by TheServant
        And what error it says it has.
        Says it in the title i believe :P

        Comment

        • TheServant
          Recognized Expert Top Contributor
          • Feb 2008
          • 1168

          #5
          Originally posted by markusn00b
          Says it in the title i believe :P
          Oh. Didn't realize that was the error... Please continue with no notice of my ramblings [/ramble]

          Comment

          • ronverdonk
            Recognized Expert Specialist
            • Jul 2006
            • 4259

            #6
            What is the purpose of [php]$query "Begin p_room_content( 1,1,:var_room_i d, :var_fixture_id , :var_fixture_de scription); End; ";[/php]I think you want an assignment to a variable here.

            Ronald

            Comment

            • Markus
              Recognized Expert Expert
              • Jun 2007
              • 6092

              #7
              Originally posted by ronverdonk
              What is the purpose of [php]$query "Begin p_room_content( 1,1,:var_room_i d, :var_fixture_id , :var_fixture_de scription); End; ";[/php]I think you want an assignment to a variable here.

              Ronald
              Nice catch!

              I looked right past that.

              Comment

              • ronverdonk
                Recognized Expert Specialist
                • Jul 2006
                • 4259

                #8
                All you need is an IDE that catches it for you!

                Ronald

                Comment

                • TheServant
                  Recognized Expert Top Contributor
                  • Feb 2008
                  • 1168

                  #9
                  Originally posted by ronverdonk
                  All you need is an IDE that catches it for you!

                  Ronald
                  ...IDE? [/n00b reveal]

                  Comment

                  • ronverdonk
                    Recognized Expert Specialist
                    • Jul 2006
                    • 4259

                    #10
                    Originally posted by TheServant
                    ...IDE? [/n00b reveal]
                    An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of a source code editor, a compiler and/or interpreter, build automation tools, and (usually) a debugger.

                    The one I use is phpDesigner 2008 V6.0.2. Works for me.

                    Ronald

                    Comment

                    • TheServant
                      Recognized Expert Top Contributor
                      • Feb 2008
                      • 1168

                      #11
                      Originally posted by ronverdonk
                      An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of a source code editor, a compiler and/or interpreter, build automation tools, and (usually) a debugger.

                      The one I use is phpDesigner 2008 V6.0.2. Works for me.

                      Ronald
                      So more professional DreamWeaver?

                      Comment

                      • ronverdonk
                        Recognized Expert Specialist
                        • Jul 2006
                        • 4259

                        #12
                        Originally posted by TheServant
                        So more professional DreamWeaver?
                        Certainly not! I like to write my own code, not by some s.... assembly application.

                        Ronald

                        Comment

                        • TheServant
                          Recognized Expert Top Contributor
                          • Feb 2008
                          • 1168

                          #13
                          Originally posted by ronverdonk
                          Certainly not! I like to write my own code, not by some s.... assembly application.

                          Ronald
                          Hmmm, I should look into this phpDesigner as I only use dreamweaver for the coloured code and I don't use any of it's other features... Thanks for that Ron.

                          Comment

                          • Markus
                            Recognized Expert Expert
                            • Jun 2007
                            • 6092

                            #14
                            I believe Ronalds is a version that costs you mooooneeeeeeeey .

                            My version of PHP Designer, however, doesn't.; Hooray for freeware!

                            PHP Designer 2007 - Personal.

                            :D

                            Comment

                            • TheServant
                              Recognized Expert Top Contributor
                              • Feb 2008
                              • 1168

                              #15
                              Originally posted by markusn00b
                              I believe Ronalds is a version that costs you mooooneeeeeeeey .

                              My version of PHP Designer, however, doesn't.; Hooray for freeware!

                              PHP Designer 2007 - Personal.

                              :D
                              Yeah been looking at that. I found the 07 Personal version just wanted to make sure it's legal (so thanks for letting me know). Well seeing you two use it it will be worth checking out!

                              Comment

                              Working...