Syntax error in SQLite example file (fix included)
Syntax error in SQLite example file (fix included)
pktm
Posts: 27Questions: 0Answers: 0
Hi!
The Editor installation instructions contain some database example files here: https://editor.datatables.net/manual/php/installing
The SQLite script is broken, because it contains some syntax errors:
- line 126 (2 columnsmissing): INSERT INTO users (title, first_name, last_name, phone, city, zip, registered_date, active, manager, site)
- should be: INSERT INTO users (title, first_name, last_name, phone, city, zip, registered_date, active, manager, site, shift_start, shift_end)
- line 289: DROP TABLE IF EXISTS audiobooks CASCADE;
- should be: DROP TABLE IF EXISTS audiobooks;
- line 305, 307, and 316 (wrong escape charachter): ( 'Assassin\'s Apprentice: The Farseer Trilogy', 'Robin Hobb', 1043, 5 ),
- should be doubled single quotes: ( 'Assassin''s Apprentice: The Farseer Trilogy', 'Robin Hobb', 1043, 5 ),
HTH
This discussion has been closed.
Replies
Thanks! I've actually picked this up as well and its fixed for the up coming 1.8.0 release.
Regards,
Allan
Thank you, Allan!
I also noticed an issue with the timestamp fields. The "without time zone" addition seems not to be supported. I didn't get a warning when running the script, though.
This is the fix for the lines 55, 56, 57, and 371:
Before:
After:
HTH
Good point - thanks. Odd that it doesn't fail with an error - it must have an explicit ignore for the postgres style typing on that part somewhere. Either way, fixed for 1.8 - thanks!
Allan