Hi there,
I'm afraid this may be a bit of a newbie error but I get the error:
Debug info: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'limit) VALUES('TKInter','Snugg1','Snuggles','1448323200','0','1')' at line 1
INSERT INTO mdl_voucher_codes (course,vouchercode,vendor,date_issued,quantity,limit) VALUES(?,?,?,?,?,?)
[array (
0 => 'TKInter',
1 => 'Snugg1',
2 => 'Snuggles',
3 => 1448323200,
4 => 0,
5 => 1,
)]
Error code: dmlwriteexception
when writing to a database table with:
print_object($record);
$lastinsertid = $DB->insert_record('voucher_codes',$record,false);
Database table exists. Attributes are correct and correctly data-typed.
The Print_Object function prints the object so I can see that it's correct. What have I done wrong please?
Cheers
Dave