0

may I´m blind after writing over 1000 lines of code, but I couldn´t catch the error.

if ($stmt = $con->prepare('UPDATE cb_coachingreport SET pdfsr1 = ?, pdfsr2 = ?. pdfsr3 = ?, pdfgesamt = ? WHERE id = ?')); 
{
    $stmt->bind_param('ssssi', $output_file_sr1, $output_file_sr2, $output_file_sr3, $output_file_gesamt, $insert_id);
    $stmt->execute();
    $stmt->close();
}

This get following error:

Fatal error: Uncaught Error: Call to a member function bind_param() on bool

So i checked the vars if there is a type mismatch.

pdfs/pdf_coaching_22_xxx_xxx.pdf Vartype: string

pdfs/pdf_coaching_22_yyy_yyy.pdf Vartype: string

pdfs/pdf_coaching_22_zzz_zzz.pdf Vartype: string

pdfs/pdf_coaching_22_gggg_gggg.pdf Vartype: string

22 Vartype: integer

Should fit, but throws an error. DB fields exits with correct data type setting.

Thanks for any hint, Markus

0 Answers0