zepernick / Codeigniter-DataTables

CodeIgniter Library For Ajax Server Side DataTables 1.10 >
MIT License
94 stars 95 forks source link

Error when table is empty #38

Open jnar opened 7 years ago

jnar commented 7 years ago

Hi, first of all thanks for sharing this nice library works great. How do I prevent this error when table has no records?

Error Number:

ERROR: syntax error near «)» LINE 3: WHERE () IS NULL ^ SELECT s.id FROM "items" "s" WHERE () IS NULL Filename: D:/www/myapp/system/database/DB_driver.php

Line Number: 691

josefig commented 7 years ago

Could you provide a gist or a paste with the sample code? I had a similar problem and wasn't the table was a problem on syntax.

leandroruel commented 7 years ago

something is wrong, "where () is null" ? what is "()"?