How to fill a cell with data from another database table

Hello, im new to this forum and also use this plugin fr the first time.

I work for someone who build his website with the help of dhtmlxgrid. It fetches data from a db table to display the entries of customers (ID, Name, Address etc). Until now one column hosts the comment for a customer. Its a single string at this point.

Now we want to change this and have more comments per entry. These additional comments are stored in another database table. In the cell we showed the one comment string before we want to display the number of comments and the time of the last made entry.

Like mentioned, the data of these comments come from another db-table. That means i need a way to make an sql query that is based on a userid. The userID is displayed in a table cell (cell 2).

Can you help me please with this “problem”, since im running out of time :frowning:

Ah yeah, i forgot, until now a click on the comment opens a popUp that shows all the userdata in detail, with all the comments. This works already since i use jqery for it. But how i can get the userids of the generated table into my php sql query?

Thans a lot for help.

I’m struggling with the same problem.

I found this:

docs.dhtmlx.com/connector__php__ … omdatabase

But I’m struggling to implement it.

Connector can work in 3 modes

a) you are providing data table name and connector loads and shows all data from it
b) you are providing a custom sql code and connector renders result set
c) you are using a custom code to fetch the data from DB and provides just an array of objects to connecto

if you can’t form a sql query to get all data, you need to use a custom code to fetch the required data records and render_array method of connector.

docs.dhtmlx.com/connector__php__ … enderarray
docs.dhtmlx.com/connector__php__ … omphparray