Re: Bug #12394: Select statement

From: Date: Thu, 26 Jul 2001 11:57:33 +0000
Subject: Re: Bug #12394: Select statement
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-61051@lists.php.net to get a copy of this message
Try the following: $sql="select * from table_name where row_name like '%searchstring%'"; <- this differes in the quotes - sometimes it makes a difference - also it shouldnot in case of MySQL by the way your example cannot work because you should end the line wit ...string%\""; <-notice the second double quote! "Peter-H Hoffmann" <peter-h.hoffmann@dil.de> wrote in message news:bug-12394@bugs.php.net... > From: peter-h.hoffmann@dil.de > Operating system: Windows NT4.0 > PHP version: 4.0.6 > PHP Bug Type: MySQL related > Bug description: Select statement > > I don't know if it is really a bug, but something is going on. > If I make a mysql select statement: > mysql> select * from table_name where row_name like "%searchstring%"; > then it shows the correct result! > > the same within php: > $sql="select * from table_name where row_name like \"%searchstring%\"; > $result=mysql_query($sql); > then it shows an incorrect result! > > Another hint for you: > I use the Xitami Webserver Version 2.5b4, it doesn't work with the <FORM > ACTION="program.php" METHOD="POST">. > I change to Version 2.5b5 now it works great! > > -- > Edit bug report at: http://bugs.php.net/?id=12394&edit=1 >

« previous php.dev (#61051) next »