LOUDMOUTH Posted April 30, 2009 Share Posted April 30, 2009 I am trying to get some info to display on a site http://boredasitgets.awardspace.biz/ When I use this, it wont display the info on the page. Can anyone help me make this right :S This is what we have now, not working. { $news_id = intval($_GET['news_id']); $total_results = mysql_result(mysql_query("SELECT COUNT as Num FROM ava_news WHERE id='".$cat_id."'"),0); if ($total_results <= 0) { echo 'This table does not exist'; } Link to comment https://forums.phpfreaks.com/topic/156224-need-help-with-echo/ Share on other sites More sharing options...
DarkSuperHero Posted April 30, 2009 Share Posted April 30, 2009 im not entirely sure because I've never used it but, shouldnt the SQL Query be something more along the lines of <?php //..... $total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM ava_news WHERE id='".$cat_id."'"),0); //...... Link to comment https://forums.phpfreaks.com/topic/156224-need-help-with-echo/#findComment-822468 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.