tallberg Posted October 20, 2006 Share Posted October 20, 2006 Can some one please describe to me the difference between these 2 queries. The first one produces 9,658 rows and second on 314 rows. I don't know what the difference is.SELECT * FROM `plantsdb` WHERE Colour_Foliage LIKE '%blue%'OR Colour_Foliage LIKE '%green%'SELECT * FROM `plantsdb` WHERE Colour_Foliage LIKE '%blue%'OR '%green%' Link to comment https://forums.phpfreaks.com/topic/24562-sql-help-please/ Share on other sites More sharing options...
fenway Posted October 20, 2006 Share Posted October 20, 2006 The first query is correct... the second query is simply evaluating '%green%' as being true on some random field, having nothing to do with Colour_Foliage, and is returning garbage. Link to comment https://forums.phpfreaks.com/topic/24562-sql-help-please/#findComment-111933 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.