0

Hi i got this error message on mysql query which has taken a toll of my time.

Fatal error: Uncaught Error: Call to a member function bind_param() on unknown in ...

Anyone encounter this unknown error before?

How can mysql display the error?

Below is my query:

($db->prepare('INSERT INTO program_list(
            PROGRAM_CODE_ID, MONTH, PDATE, HOURS, PUNIQUE, AUNIQUE, 
            EYEBALL, LEVEL, REMARK, REVENUE, TRAINER_ID, CLIENT_ID, ADMIN_ID, UPD_TIME) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)')) || fail('MySQL prepare', $db->error);

$stmt->bind_param('ssssssssssssss', $program_code, $month, $pdate, $hours,  $unique, $adult, $eyeball, $lvl,  $remark, $revenue, $trainer_id, $client_id,  $admin_id, $time) || fail('MySQL bind_param', $db->error);

I did the echo of the query with variables and able to execute the query successfully on phpmyadmin.

davidlee
  • 5,611
  • 17
  • 56
  • 82

0 Answers0