SQL newbie

From: Date: Fri, 06 Sep 2002 03:00:22 +0000
Subject: SQL newbie
Groups: php.db 
Request: Send a blank email to php-db+get-21635@lists.php.net to get a copy of this message
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

« previous php.db (#21635) next »