Retrieve data from other mysql tables

Retrieve data from other mysql tables

JenkinsJenkins Posts: 3Questions: 0Answers: 0
edited February 2012 in DataTables 1.9
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?

Replies

  • JenkinsJenkins Posts: 3Questions: 0Answers: 0
    Anyone?
  • allanallan Posts: 63,493Questions: 1Answers: 10,470 Site admin
    So you want to do a JOIN on two tables? Have a look at this script: http://datatables.net/dev/server_processing.txt

    Allan
  • JenkinsJenkins Posts: 3Questions: 0Answers: 0
    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.