【发布时间】:2012-09-27 06:08:37
【问题描述】:
可能重复:
How do i “echo” a “Resource id #6” from a MySql response in PHP?
大家好,当我尝试在 PHP 中运行我的代码时出现错误。 它在我的屏幕上显示资源 id #53。我只想计算我的一个领域的总数,但我遇到了这个错误。下面是我的代码:
$last_points = mysql_insert_id();
//echo $last_points , display like 12... no error
$fkid = $last_points; // no error....
$sql = "SELECT COUNT(*) FROM downline WHERE fkmember = {$fkid}";
$execute = mysql_query($sql) or die (mysql_error());
echo $execute; //display error why?
请帮帮我。我想这是我的问题。
【问题讨论】:
标签: php mysql database codeigniter