I get error:
"Warning: Supplied argument is not a valid MySQL result resource in.."
But I don't think there should be any error in code below.
Thank you for your help!
thread
******
id
topic
title
SOURCE:
$my_sql_string_count = "
SELECT COUNT(id) AS counter
FROM thread
WHERE topic = 1
";
$result_count = mysql_query ($my_sql_string_count);
$row_count = mysql_fetch_row ($result_count);
echo $row_count["counter"];
"Warning: Supplied argument is not a valid MySQL result resource in.."
But I don't think there should be any error in code below.
Thank you for your help!
thread
******
id
topic
title
SOURCE:
$my_sql_string_count = "
SELECT COUNT(id) AS counter
FROM thread
WHERE topic = 1
";
$result_count = mysql_query ($my_sql_string_count);
$row_count = mysql_fetch_row ($result_count);
echo $row_count["counter"];