RE: [PHP] Special characters --> single quote

From: Date: Tue, 22 Aug 2000 13:10:46 +0000
Subject: RE: [PHP] Special characters --> single quote
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-12930@lists.php.net to get a copy of this message
TO early in morning, typo on my part. "UPDATE toto SET OBSERVATION = '".addslashes($OBSERVATION)."' WHERE id=$number" > -----Original Message----- > From: ludovic [mailto:ludovic@logosapience.com] > Sent: 22 August 2000 13:58 > To: James Moore > Cc: php-general@lists.php.net > Subject: Re: [PHP] Special characters --> single quote > > > James, > > If I make > "UPDATE toto SET OBSERVATION = '".addslashes."' WHERE > id=$number"; > I will see in the field OBSERVATION the string addslashes, isn't it ? > > I don't think that the uppercase or lowercase is important for > the name of the > table ... > Anymore, I have tried in lower case but always the same problem... > UPDATE toto SET observation = '$OBSERVATION' WHERE id=$number > > The only solution that I have found for the moment is to replace > the single > quote by the double quote > but I am not very satisfied by this one. > $OBSERVATION=ereg_replace("[']","\"",$OBSERVATION); > > I have got the same problem for MicrosoftSQLServer. > > James Moore a écrit : > > > > > > > This is the query > > > > > > $query = > > > "update toto set > > > OBSERVATION='$OBSERVATION' where id =$number"; > > > > OK. > > > > "UPDATE toto SET OBSERVATION = '".addslashes."' WHERE > > id=$number"; > > ^^^^^^^^^^^- Personal opinion but tables should be in > > lowercase when created, then they are easier to see in SQL > statements, (Caps > > all Keywords, lowercase all table/col names). > > >

« previous php.general (#12930) next »