pietbez Posted December 30, 2008 Share Posted December 30, 2008 hi, i have a small problem here, this code would work fine if the photourl table had numerical data, but the photourl table holds url info. how can i change the code so that only those entries that have a photourl entries are read. some of my photourl fields are empty, i want them exluded from the query. $do=mysql_query ("SELECT * FROM links WHERE item = $item and photourl > 0" ); Link to comment https://forums.phpfreaks.com/topic/138894-not-null-fields/ Share on other sites More sharing options...
flyhoney Posted December 30, 2008 Share Posted December 30, 2008 $do = mysql_query ("SELECT * FROM links WHERE item = $item and photourl IS NOT NULL"); Link to comment https://forums.phpfreaks.com/topic/138894-not-null-fields/#findComment-726299 Share on other sites More sharing options...
pietbez Posted December 30, 2008 Author Share Posted December 30, 2008 got it, i was trying "photourl = NOT NULL" thanks. Link to comment https://forums.phpfreaks.com/topic/138894-not-null-fields/#findComment-726309 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.