반환 :
$mysql = new mysqli(DB_SERVER, DB_USER, DB_PASSWORD, DB_NAME) or die('There was a problem connecting to the database');
$stmt = $mysql->prepare('SELECT id,vcref,jobtitle,jobtype,jobintro,closingdate FROM jobs WHERE active = 1');
$stmt->execute();
$stmt->store_result;
$stmt->bind_result($id,$vcref,$jobtitle,$jobtype,$jobintro,$closingdate);
$stmt->fetch();
$totalLiveJobs = $stmt->num_rows();
출력은 '일관되게 0
DB에서 직접 실행하면 얼마나 되나요? – Ismael
쿼리 기준과 일치하는 2 개의 행이 있다는 것을 알고 있습니다 - 그것은 사상가입니다. 입력 m8을위한 –