reserved word "table"

reserved word "table"

jytestjytest Posts: 26Questions: 0Answers: 0
edited January 2013 in General
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?

Replies

  • jytestjytest Posts: 26Questions: 0Answers: 0
    I add :
    [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]
  • jytestjytest Posts: 26Questions: 0Answers: 0
    No response ?
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Please link to a test case: http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read

    Allan
  • jytestjytest Posts: 26Questions: 0Answers: 0
    Sorry.
    But my website is :
    www.celinni.com/creaprint/simple00.php
    Soon, I hope
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Seems to work fine for me. Does it not work for you?
  • jytestjytest Posts: 26Questions: 0Answers: 0
    edited January 2013
    Normal, I tested on my side.
    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]
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    From the server:

    [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.
  • jytestjytest Posts: 26Questions: 0Answers: 0
    Thanks
This discussion has been closed.