Use a function to check mysql with SSP

Use a function to check mysql with SSP

zamotyzamoty Posts: 1Questions: 1Answers: 0

Hi,

I'm using datatable along jquery and PHP.

In one of my tables, I had a field that must to show the name of a user, but the mysql table just have the id of this user, so I developed a function to return the name of the user, and I used like this:

array(
'db' => 'userId',
'dt' => 'userName',
'formatter' => function( $d, $row ) {
return returnUserName($d);
}
)

The function is working fine, but when I use it with the datatable the table doesn´t load and shows an error message. I already use functions in the formatter and they work OK, but this function that has to connect to mysql is not working.

Does anybody know what I am doing wrong?

Thanks.

Answers

  • Tom (DataTables)Tom (DataTables) Posts: 139Questions: 0Answers: 26

    Hi

    If you could post the error message and also post the data that is being returned from the server that would great. I can then take a look.

    Thanks

    Tom

This discussion has been closed.