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? Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/254814-cannot-get-the-value/#findComment-1306574 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.