Wakie

Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • in reply to: Not populating JSON data #95133
    Wakie
    Participant

    Hi Reg, thanks for your reply.

    Unfortunately your tip made no difference – my JSON now looks like this:

    {"page":"1","total":"100","records":"1","rows":[{"id":"200","cell":["200","111","test","664.3","144","900","yay"]}]}

    Regards

    Wakie

    in reply to: Not populating JSON data #95129
    Wakie
    Participant

    Database connectivity is fine, it returns the JSON output in my first post. I'm pretty concerned that even the provided examples don't work…

    in reply to: Not populating JSON data #95126
    Wakie
    Participant

    Hi churd,

    It's essentially a hacked up version of the demo PHP script, but here it is anyway:

    <?php
    $page = 1;//$_GET['page']; // get the requested page
    $limit = $_GET['rows']; // get how many rows we want to have into the grid
    $sidx = $_GET['sidx']; // get index row - i.e. user click to sort
    $sord = $_GET['sord']; // get the direction
    if(!$sidx) $sidx =1;
    // connect to the database
    $db = mysql_connect('localhost', 'root', '')
    or die("Connection Error: " . mysql_error());

    mysql_select_db('fone_site') or die("Error conecting to db.");
    $result = mysql_query("SELECT COUNT(*) AS count FROM invheader a, clients b WHERE a.client_id=b.client_id");
    $row = mysql_fetch_array($result,MYSQL_ASSOC);
    $count = $row['count'];

    if( $count >0 ) {

Viewing 3 replies - 1 through 3 (of 3 total)

Stay connected with us in your favorite flavor!