DataTables logo DataTables

Retrieve data from other mysql tables
  • Hello everyone!

    The default server-side script retrieves the data from a certain mysql table. No problem with that. But i want to use other mysql tables with it. For example, in a table named people, there are columns for name, age, job. And in the job column there is an id number of the jobs from another mysql table. So when i use it normally, its output is like:

    John 30 3

    But i want to make this like:

    John 30 Engineer

    How can i do it?
  • So you want to do a JOIN on two tables? Have a look at this script: http://datatables.net/dev/server_processing.txt

    Allan
  • Yes, this code does the JOIN but when i type something in the search section, i got this warning twice:
    "DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error."

    Also, Allan, I think you should add more documents about customization of the server-side version of the script that make us able to do what we want on this script.
This discussion has been closed.
All Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Support

Get useful and friendly help straight from the source.