嗨我想顯示數據庫中項目的數量。以下是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