aebstract Posted February 21, 2010 Share Posted February 21, 2010 $query = mysql_query("SELECT * FROM news WHERE id = '1'") or DIE(mysql_error()); if(mysql_num_rows($query)==0){ while($r=mysql_fetch_array($query)) { echo "working"; } } else { echo "too bad"; } I keep getting "too bad" returned and I don't see anything wrong with my query? I tried doing just SELECT * FROM news and that didn't work so I tried to be more specific, still no sauce. Is news a predefined variable or something and I can't use it? Link to comment https://forums.phpfreaks.com/topic/192815-query-not-grabbing/ Share on other sites More sharing options...
aebstract Posted February 21, 2010 Author Share Posted February 21, 2010 Wow nevermind I feel stupid now. =[ Link to comment https://forums.phpfreaks.com/topic/192815-query-not-grabbing/#findComment-1015666 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.