Re: passing reserved words as a string to mySQL
| From: | Kieu D. Trang | Date: | Wed, 14 May 2003 19:55:28 +0000 |
| Subject: | Re: passing reserved words as a string to mySQL | ||
| References: | 1 2 3 4 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-27752@lists.php.net to get a copy of this message | ||
Thanks all for replying... i figured it out... it wasn't the reserved
word... my mistake was i didn't escape some of the characters in my if
statement...
KD
On Wed, 14 May 2003, Becoming Digital wrote:
> Use settype() on the variable prior to concatenation.
> http://www.php.net/manual/en/function.settype.php
>
> Edward Dudlik
> Becoming Digital
> www.becomingdigital.com
>
>
> ----- Original Message -----
> From: "Kieu D. Trang" <kdtrang@loyno.edu>
> To: <php-db@lists.php.net>
> Sent: Wednesday, 14 May, 2003 10:13
> Subject: [PHP-DB] passing reserved words as a string to mySQL
>
>
> hi all...
> I am having a problem passing the reserved word "IF" as a string...
> I am concatenating a query string in which includes
>
> "IF (something is not NUL, blah, blah, blah) as name"
>
> but the string is always 0 since it evaluate the if statement before
> concatenating it to the $query_string...
>
> I don't know how to pass this problem... your advise is appreciated.
> thanks,
> KD
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>