[英]Why this SQL query is returning null?
$sql_amorgia = "select * from fb_event where eventid='20'";
$res_amorgia = mysql_query($sql_amorgia);
$no_of_e = mysql_num_rows($res_amorgia);
When I print out $no_of_e it prints nothing. 当我打印出$ no_of_e时,它什么也不打印。 It should print 0 in case of null record.
如果记录为空,则应打印0。 Isnt it?
是不是
please check! 请检查!
Actually I was using mysql_num_rows()
instead of mssql_num_rows()
. 实际上,我使用的是
mysql_num_rows()
而不是mssql_num_rows()
。 Because the database I was using was MS SQL Server 2005. 因为我使用的数据库是MS SQL Server 2005。
Thanks for your comments 感谢您的意见
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.