database uses 'sid' instead of 'id'

database uses 'sid' instead of 'id'

Sasori7Sasori7 Posts: 25Questions: 9Answers: 0

In this discussion,, it's not clear if it the first column must be 'id'. My database is set up to use 'sid'.

Also, how does this affect editor?


  • kthorngrenkthorngren Posts: 19,509Questions: 26Answers: 4,624

    I might not understand the question but the Editor's idSrc option is hwo you tell Editor what your row ID is. Datatables uses rowId.

    The first column doesn't need to be id nor does it need to contain the ID for the row.


  • Sasori7Sasori7 Posts: 25Questions: 9Answers: 0
    edited February 2022

    ok, in my mysql database the 'id' is a column named 'sid'
    In the example you provided, it's referred to as 'id'.
    and idSrc:'sid' will work?

  • colincolin Posts: 15,031Questions: 1Answers: 2,570

    Yep, exactly, that should do the trick,


  • allanallan Posts: 60,345Questions: 1Answers: 9,803 Site admin

    If you are using our server-side libraries for Editor see this page for details on how to specify the primary key column name. You don't then need to use rowId / idSrc as the libraries will take care of it for you.


Sign In or Register to comment.