number of columns with Sever_side processing

number of columns with Sever_side processing

dazelldazell Posts: 17Questions: 0Answers: 0
edited January 2010 in General
Hi evryone,

Due to the big size of my database I decided to use ServerSide processing with sAjaxSource. I pick up the example page and I re-write it with my sql infos and it works great!
But when I try to add some new rows like this :

[code] $sOutput .= '"'.addslashes($aRow['genre']).'",';[/code]
and this :
[code] else if ( $i == 4 )
return "user";[/code]

I've got an error message "number of column don't mach".
I read that the array aRow must have the same number of columns than the html tables but indeed they have the same number of column !

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Hi dazell,

    First thing to do is ensure that your json return is valid using: http://www.jsonlint.com . If that's fine then the next thing to check is that the number of TH elements (the number of columns) matches the number of array elements sent back in your json. If that doesn't help, then perhaps you could post a link?

    Thanks,
    Allan
  • dazelldazell Posts: 17Questions: 0Answers: 0
    So I add again my new row in server_side.php and index.htm, validate the json and ... It's OK !
    Sorry for the post and thanks allan, it works !
This discussion has been closed.