1
db에서 데이터를 가져 오려고하는데 mysqli fetch() 함수가 페치되지 않고 작동하지 않고 false를 반환합니다. 아래에 내가 사용하고 도움이 제발 기능입니다.mysqli fetch()가 가져 오지 않음
public function return_track_order_details($adRef,$transaction_id){
$db = parent::Connect_Database();
$stmt = $db->prepare("SELECT * FROM `s_b_p_h` WHERE `ad_reference` = ? AND `transaction_id` = ? LIMIT 1 ");
$stmt->bind_param('ss',$adRef,$transaction_id);
$stmt->execute();
$stmt->bind_result(
$id,
$date,
$name,
$email,
$phone,
$full_address,
$total_amount_paid,
$buyers_account_id,
$sellers_account_id,
$ad_reference,
$transaction_id,
$status_by_buyers,
$status_by_sellers,
$net_status
);
if($stmt->fetch()){
$id = $this->xss_clean($id);
$date = $this->xss_clean($date);
$name = $this->xss_clean($name);
$email = $this->xss_clean($email);
$phone = $this->xss_clean($phone);
$full_address = $this->xss_clean($full_address);
$total_amount_paid = $this->xss_clean($total_amount_paid);
$buyers_account_id = $this->xss_clean($buyers_account_id);
$sellers_account_id = $this->xss_clean($sellers_account_id);
$ad_reference = $this->xss_clean($ad_reference);
$transaction_id = $this->xss_clean($transaction_id);
$status_by_buyers = $this->xss_clean($status_by_buyers);
$status_by_sellers = $this->xss_clean($status_by_sellers);
$net_status = $this->xss_clean($net_status);
}else{
return false;
}
}
내가 잘못하고있는 것이 있습니까?
나는 내 진술이 맞는지 확인하고 실행 여부를 확인했습니다.
데이터베이스 호출시 오류 처리가 없습니다. 이 부분을 스크립트 상단에 놓고 예외가 발생하는지 확인하십시오 : mysqli_report (MYSQLI_REPORT_STRICT); – jeroen