// constructing a JSON $responce->page = $page; $responce->total = $total_pages; $responce->records = $count; $i=0; while($row = mysql_fetch_array($result,MYSQL_ASSOC)) { $responce->rows[$i]['id']=$row[id]; $responce->rows[$i]['cell']=array($row[id],$row[invdate], $row[name],$row[amount],$row[tax],$row[total],$row[note]); $i++; } // return the formated data echo $json->encode($responce); ?>
I am using the Python DBI (postgres) directly and I don't have any problem with that. I am just not sure of what $response is in this example, it looks like a object. I am trying to get the DBI output to display in this grid: http://trirand.com/jqgrid/jqgrid.html (getting started menu option) is there a nice way in Pylons to JSON encode the results of a DBI query? Thanks, Snorkel --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---