[eluser]paulopmx[/eluser]
[quote author="mattny" date="1216950980"]Paulo, amazing work. You have been all over the social sites and i recently ditched phpGrid for your much nicer javascript code.
Im an odd ball using PHP5 + MS SQL 2000 + Flexigrid. Im having some issues where the flexigrid control will error out when paging through the data or during certain sorting operations. I can't seem to pin point my issue. I was wondering if there are any debug options. Id really love to see the actual query that my PHP JSON script is executing during the ajax requests, but im just not sure how to do so. Here is my PHP JSON script (hacked from yours)
Code:
<?
include '../classes/class.mssql.php'; //this class works fine.
$sql = "SELECT TOP $rp $fields FROM $table WHERE $pk NOT IN (SELECT $pk FROM (SELECT TOP $start $fields FROM $table $where2 $sort) as [tbl1]) $where3 $sort";
$db->query($sql);
while ($db->fetchRow()) {
if ($rc) $json .= ",";
$json .= "\n{";
$json .= "id:'".$db->record['ID']."',";
$json .= "cell:['<a id=".record['ID'].">".$db->record['ID']."</a>','".$db->record['Name']."','".addslashes($db->record['State'])."','".addslashes($db->record['Phone'])."']";
$json .= "}";
$rc = true;
//please note the anchor tag above is syntactically correct, dunno why the BBS is not taking my code, but that's NOT and issue thanks.
}
$json .= "]\n";
$json .= "}";
echo $json;
$db->disconnect();
?>
[/quote]
Try firebug, the friend of every javascript programmer. :-)