Use a function to check mysql with SSP
Use a function to check mysql with SSP
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
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