robert_gsfame Posted January 11, 2012 Share Posted January 11, 2012 let say i have this ================= mycolumn ================= carrot, apple & orange and i try this $query=mysql_query("SELECT * FROM table WHERE mycolumn='carrot, apple & orange'"); $numrow=mysql_num_rows($query); echo $numrow; why do i always get 0 instead of 1 ?? I guess something caused by the comma there. How to fix it anyway? Link to comment https://forums.phpfreaks.com/topic/254814-cannot-get-the-value/ Share on other sites More sharing options...
Pikachu2000 Posted January 11, 2012 Share Posted January 11, 2012 There's probably leading/trailing whitespace in your data. Link to comment https://forums.phpfreaks.com/topic/254814-cannot-get-the-value/#findComment-1306574 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.