Forum Moderators: coopster
If I run the following query in phpMyAdmin, I get 4 results:
SELECT * FROM b4ads WHERE instr(lower(comments),'erika')>0
But, if I insert the query into a .php file as the following line, I only get 3 results:
mysql_query("SELECT * FROM b4ads WHERE instr(lower(comments),'erika')>0",$dbq);
Even if I use the working phpMyAdmin results via the "create PHP" link, it does not work when I insert it into the php file (I still only get the 3 results):
$sql = 'SELECT * ';
$sql .= 'FROM `b4ads` ';
$sql .= 'WHERE instr( lower( comments ) , \'erika\' ) > 0 LIMIT 0, 30';
mysql_query($sql,$dbq);
IMPORTANT HINT:
If I Edit the excluded result in phpMyAdmin, and "Insert as a new row", the new (exact same) row DOES show in the php query.
ALSO:
The result that is not being found by the php query is one that was inserted into the table b4ads by importing from a text file via phpMyAdmin, if that makes any difference.
Any ideas?