Re: ODBC problem..

From: Date: Sun, 11 Jun 2000 14:39:58 +0000
Subject: Re: ODBC problem..
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-316@lists.php.net to get a copy of this message
On Sun, 11 Jun 2000, M.Stolte wrote: > > The problem is the <'> in the value. Anyone got a nice solution howto make > > this works and make the ODBC succeed. > > Simply finding and replacing it with \' should do the trick.. > Look for regex etc. in the manual. Had this problem myself.. :) Before the start of the db_query, just put: $str = addslashes($str) For any fields you think would have any characters like a \ or a ' that would need to be escaped with a \. For example: $username = addslashes($username); $accountname = addslashes($accountname); $db_query = ... And so on. -- Mike Dugas mad@phobia.net

« previous php.db (#316) next »