Jump to content

Need help with echo


LOUDMOUTH

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.