Subject | Re: [firebird-php] SQL script |
---|---|
Author | Dorin Pacurar |
Post date | 2003-11-20T11:36:03Z |
In a form, in a TEXTAREA I wrote
SELECT CLIENT FROM PERSOANE WHERE NUME STARTING WITH 'O''TOOL'
The line in my script is:
$result=ibase_query($conn, addslashes($_POST"Textarea_content"]));
The result :
Warning: ibase_query(): Dynamic SQL Error SQL error code = -104 Token
unknown - line 1, char 58 O in c:\apache\htdocs\action.php on line 14
in php.ini I've set magic_quotes_sybase = on
-------Original Message-------
From: firebird-php@yahoogroups.com
Date: Thursday, November 20, 2003 12:18:21 PM
To: firebird-php@yahoogroups.com
Subject: Re: [firebird-php] SQL script
Hi,
Yep, thats it.
If you have set magic_quotes_sybase to On in your php.ini, addslashes()
will also do that for you.
/thomas
Milan Babuskov wrote:
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/PhFolB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
firebird-php-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
.
[Non-text portions of this message have been removed]
SELECT CLIENT FROM PERSOANE WHERE NUME STARTING WITH 'O''TOOL'
The line in my script is:
$result=ibase_query($conn, addslashes($_POST"Textarea_content"]));
The result :
Warning: ibase_query(): Dynamic SQL Error SQL error code = -104 Token
unknown - line 1, char 58 O in c:\apache\htdocs\action.php on line 14
in php.ini I've set magic_quotes_sybase = on
-------Original Message-------
From: firebird-php@yahoogroups.com
Date: Thursday, November 20, 2003 12:18:21 PM
To: firebird-php@yahoogroups.com
Subject: Re: [firebird-php] SQL script
Hi,
Yep, thats it.
If you have set magic_quotes_sybase to On in your php.ini, addslashes()
will also do that for you.
/thomas
Milan Babuskov wrote:
> Dorin Pacurar wrote:------------------------ Yahoo! Groups Sponsor ---------------------~-->
>
>>How can I pass the SQL text with ' to a form ?
>
>
> I'm not 100% sure what is your question, but you probably need to escape
> ' with another ', ie. use '', like this:
>
> SELECT * FROM nba_player WHERE name = 'Shaquille O''neal';
>
> HTH
>
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/PhFolB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
firebird-php-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
.
[Non-text portions of this message have been removed]