[ Web 관련 ]/php

php mysql 쿼리 실행 오류 - Commands out of sync; you can't run this command now

BIZLAB 2021. 9. 15. 14:38

프로시저 실행후 쿼리를 실행하면 아래 오류 발생 가능성 있음

 

Commands out of sync; you can't run this command now

 

 

$conn = mysqli_connect($host, $user, $pass, $db);

$db_conn = mysqli_select_db($conn, $DBName);

 

....

$sql = " CALL USP_Appoint_Recommend() ";

$result = mysqli_query($conn, $sql);

 

(일반)

mysqli_next_result($conn);

 

(그누보드)

mysqli_next_result($g5['connect_db']);

 

 

참조