reserved word "table"
reserved word "table"
I use your jquery DataTables with the ajax server_processing.
I have a table in which there is a field called "table".
JSON apparently does not like the name field!
Is not the only one working on this table, I can not change the name permettrre this field directly in the database!
How else?
Can you help me?
I have a table in which there is a field called "table".
JSON apparently does not like the name field!
Is not the only one working on this table, I can not change the name permettrre this field directly in the database!
How else?
Can you help me?
This discussion has been closed.
Replies
[code]$aColumns = array('item_id', 'cut', 'carat', 'cut_grade', 'color', 'clarity', 'polish', 'symmetry', 'depth', 'table', 'fluo_intensity', 'price_per_carat', 'culet_size', 'total_price' );
[/code]
Allan
But my website is :
www.celinni.com/creaprint/simple00.php
Soon, I hope
So, I put everything in a state!
Can you help me?
My server_processing is :
"/js/dt/chargementbdd.php"
After many tests, the problem is :
a field of the table is nommed "table"
Meesage fo error :
[quote]DataTables warning (table id = 'example'): DataTables
warning: JSON data from server could not be parsed. This is
caused by a JSON formatting error.[/quote]
[quote]
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 'table, fluo_intensity, price_per_carat, culet_size, total_price
FROM diamant' at line 1
[/quote]
Nothing to do with DataTables, its an SQL reserved word. You need to escape it.