Re: Problem with symbol &

From: Date: Mon, 25 Feb 2002 08:14:42 +0000
Subject: Re: Problem with symbol &
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-17250@lists.php.net to get a copy of this message
The problem is that you probably use phpMyAdmin for editing data. Regards, Andrey Hristov ----- Original Message ----- From: "Marco Coletta" <macolet@goldtelevision.com> To: <php-db@lists.php.net> Sent: Monday, February 25, 2002 10:08 AM Subject: [PHP-DB] Problem with symbol & > I have a problem with symbol &. > > In PHP script I have a variable with a string assigned containing the > symbol '&' : > > $myvariable = 'Smith & Sons'; > when I insert the variable in the database : > > $query="insert into mytable (mycolumn) values > (myvalue1='$myvariable');"; > > $result=mysql_query($query); > > if I edit directly the column in Mysql the symbol '&' has been > translated to '&amp;'. > > The real problem is that if I do a query with where looking for the content > of record where myvalue='Smith & Sons' > in this case the symbol & is not translated and so the query has no success. > > > > > > > > -- > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.db (#17250) next »