嗨我想显示数据库中项目的数量。以下是PHP代码:计数并显示数据库中的项目数
$jobid = $_SESSION['SESS_MEMBER_JOB'];
$data = "SELECT * FROM attributes WHERE jobid = $jobid";
$attribid = mysql_query($data) or die(mysql_error);
$count = "SELECT count(*) FROM attributes WHERE jobid = $jobid";
$database_count = mysql_query($count);
//Declare the Array
$DuetiesDesc = array();
print_r ($database_count);
而不是得到所期望的结果,但是,我得到:
资源ID#14
请协助
['MySQL'](http://php.net/manual/en/book.mysql.php)('mysql_ *'函数)扩展名是[*** deprecated ***](http://php.net) /manual/en/function.mysql-connect.php)。我建议使用['MySQLi'](http://php.net/manual/en/book.mysqli.php)('mysqli_ *'函数)或['PDO'](http://php.net/手册/ en/book.pdo.php)。 – BlitZ