php-db | 2002091
Date: 09/05/02
- Next message: Boaz Yahav: "RE: [PHP-DB] SQL newbie"
- Previous message: Adam Williams: "Re: [PHP-DB] Apache 2.X and PHP"
- Next in thread: Boaz Yahav: "RE: [PHP-DB] SQL newbie"
- Maybe reply: Boaz Yahav: "RE: [PHP-DB] SQL newbie"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
I'm using the following statements to insert a record into a table:
$SQL_Exec_String = "Insert Into Messages
(ReplyID,Subject,Sender,Email,Message,Reviewed)
Values ($ReplyID,'$Subject','$Sender','$Email','$Message',$Reviewed)";
$cur = odbc_exec( $cnx, $SQL_Exec_String );
This works great except when I have a string like "don\'t get in my way"
which has an apostrophe in it and causes the statement to get confused. It
seems to me that SQL should have an escape sequence of some kind. Can
someone get me pointed in the right direction?
Thanks!
___________________
John Long
www.wiseheart.20m.com
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Boaz Yahav: "RE: [PHP-DB] SQL newbie"
- Previous message: Adam Williams: "Re: [PHP-DB] Apache 2.X and PHP"
- Next in thread: Boaz Yahav: "RE: [PHP-DB] SQL newbie"
- Maybe reply: Boaz Yahav: "RE: [PHP-DB] SQL newbie"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

