9 Replies Latest reply on Apr 27, 2006 11:47 AM by Newsgroup_User

    GetSQLValueString DW function

    Level 7
      Hi!

      Where can I find documentation about the GetSQLValueString DW function?

      TIA

      Nanu

        • 1. Re: GetSQLValueString DW function
          Level 7
          Nanu Kalmanovitz wrote:
          > Where can I find documentation about the GetSQLValueString DW function?

          There isn't any. It simply prepares values for insertion into MySQL by
          adding quotes where necessary and escaping any quotes in user input.

          --
          David Powers
          Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
          Author, "Foundation PHP 5 for Flash" (friends of ED)
          http://foundationphp.com/
          • 2. Re: GetSQLValueString DW function
            Level 7
            Thanks1

            Please explain what will be the $value after executing the following
            statement:

            $value = GetSQLValueString($_GET['foo'], 'text');

            TIA

            Nanu


            David Powers wrote:
            > Nanu Kalmanovitz wrote:
            >
            >> Where can I find documentation about the GetSQLValueString DW function?
            >
            >
            > There isn't any. It simply prepares values for insertion into MySQL by
            > adding quotes where necessary and escaping any quotes in user input.
            >

            • 3. Re: GetSQLValueString DW function
              Level 7
              Nanu Kalmanovitz wrote:
              > Please explain what will be the $value after executing the following
              > statement:
              >
              > $value = GetSQLValueString($_GET['foo'], 'text');

              What I said before:

              >> It simply prepares values for insertion into MySQL by
              >> adding quotes where necessary and escaping any quotes in user input.

              The actual result depends on the contents of $_GET['foo']. If it's
              "hello", the result is 'hello'. If it's "don't ask", the result is
              'don\'t ask'.

              --
              David Powers
              Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
              Author, "Foundation PHP 5 for Flash" (friends of ED)
              http://foundationphp.com/
              • 4. Re: GetSQLValueString DW function
                Level 7
                I used it this way:

                <?php
                $value = GetSQLValueString($_GET['MyVariable'], 'text');
                ?>

                the server display the message:

                Fatal error: Call to undefined function: getsqlvaluestring() in
                Applic:/HTDocs/k_comm/hebrew/Israel/Tiulim/test5nanu.php on line 36

                What can be the problem?

                TIA

                Nanu

                David Powers wrote:
                > Nanu Kalmanovitz wrote:
                >
                >> Please explain what will be the $value after executing the following
                >> statement:
                >>
                >> $value = GetSQLValueString($_GET['foo'], 'text');
                >
                >
                > What I said before:
                >
                >>> It simply prepares values for insertion into MySQL by adding quotes
                >>> where necessary and escaping any quotes in user input.
                >>
                >
                > The actual result depends on the contents of $_GET['foo']. If it's
                > "hello", the result is 'hello'. If it's "don't ask", the result is
                > 'don\'t ask'.
                >

                • 5. Re: GetSQLValueString DW function
                  Level 7
                  Nanu Kalmanovitz wrote:
                  > Fatal error: Call to undefined function: getsqlvaluestring() in
                  > Applic:/HTDocs/k_comm/hebrew/Israel/Tiulim/test5nanu.php on line 36
                  >
                  > What can be the problem?

                  GetSQLValueString() is a custom-built function. You clearly used it in a
                  page where the function hasn't been defined.

                  --
                  David Powers
                  Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
                  Author, "Foundation PHP 5 for Flash" (friends of ED)
                  http://foundationphp.com/
                  • 6. Re: GetSQLValueString DW function
                    Level 7
                    Thanks

                    Nanu

                    David Powers wrote:
                    > Nanu Kalmanovitz wrote:
                    >
                    >> Fatal error: Call to undefined function: getsqlvaluestring() in
                    >> Applic:/HTDocs/k_comm/hebrew/Israel/Tiulim/test5nanu.php on line 36
                    >>
                    >> What can be the problem?
                    >
                    >
                    > GetSQLValueString() is a custom-built function. You clearly used it in a
                    > page where the function hasn't been defined.
                    >

                    • 7. Re: GetSQLValueString DW function
                      Level 7
                      .oO(David Powers)

                      >Nanu Kalmanovitz wrote:
                      >> Fatal error: Call to undefined function: getsqlvaluestring() in
                      >> Applic:/HTDocs/k_comm/hebrew/Israel/Tiulim/test5nanu.php on line 36
                      >>
                      >> What can be the problem?
                      >
                      >GetSQLValueString() is a custom-built function. You clearly used it in a
                      >page where the function hasn't been defined.

                      It came from a script that I suggested as an example ... but if
                      necessary it should be easy enough to find the source code for that
                      function at Google Groups, it has been posted here multiple times.

                      Micha
                      • 8. Re: GetSQLValueString DW function
                        Level 7
                        Michael Fesser wrote:
                        >>GetSQLValueString() is a custom-built function. You clearly used it in a
                        >>page where the function hasn't been defined.
                        >
                        > It came from a script that I suggested as an example ... but if
                        > necessary it should be easy enough to find the source code for that
                        > function at Google Groups, it has been posted here multiple times.

                        You can find the source code very easily by using an insert record or
                        update record server behavior. It's automatically created by
                        Dreamweaver, but it must be in a page (or an include) for you to be able
                        to use it.

                        --
                        David Powers
                        Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
                        Author, "Foundation PHP 5 for Flash" (friends of ED)
                        http://foundationphp.com/
                        • 9. Re: GetSQLValueString DW function
                          Level 7
                          Thanks!

                          Nanu

                          David Powers wrote:
                          > Michael Fesser wrote:
                          >
                          >>> GetSQLValueString() is a custom-built function. You clearly used it
                          >>> in a page where the function hasn't been defined.
                          >>
                          >>
                          >> It came from a script that I suggested as an example ... but if
                          >> necessary it should be easy enough to find the source code for that
                          >> function at Google Groups, it has been posted here multiple times.
                          >
                          >
                          > You can find the source code very easily by using an insert record or
                          > update record server behavior. It's automatically created by
                          > Dreamweaver, but it must be in a page (or an include) for you to be able
                          > to use it.
                          >