This question already has an answer here:
I am trying to list data from a mysql,
but I get the error:
"Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in
/home/cassiano/public_html/myradio.net.br/events.php on line 114"
I can not paste the code here, always goes wrong, then please see the notepad code
Thanks
</div>
you used given statement in your code
$total_playlist = mysql_num_rows(mysql_query("SELECT * FROM agenda_playlist where codigo_stm = '".$dados_stm["codigo"]."' ORDER by login"));
here
mysql_query("SELECT * FROM agenda_playlist where codigo_stm = '".$dados_stm["codigo"]."' ORDER by login")
will output the empty result you need to modify it
Try This
$total_playlist = 0;
$res_count = mysql_query("SELECT count(*) as cnt FROM agenda_playlist where codigo_stm = '".$dados_stm["codigo"]."' ORDER by login");
if($row_count = mysql_fetch_assoc($res_count))
{
$total_playlist = $row_count['cnt'];
}
instead of
$total_playlist = mysql_num_rows(mysql_query("SELECT * FROM agenda_playlist where codigo_stm = '".$dados_stm["codigo"]."' ORDER by login"));