DHTMLX dataview data display problems
Am working on an applicationn that uses dhtmlx dataview to display db data on a page.
I have implemented custom paging as per the example provided in the dhtmlx docs.
The problem iam having is that the display keeps losing data i.e. it shows records upto a certain point, skips some records, then goes back to display more records. How would i go about solving this problem?
My codes are shown below:
//containers
//dataview init and data loading
dhxView=new dhtmlXDataView({container:“sresults_container”,type:“dish2”});
new_one = “{common.first()}{common.prev()}
pager = dhxView.define(“pager”, {container: “paging_here”,size: 7});
pager.define(“template”, new_one);
dhxView.load(“…/includes/data/dhx_dataview.php?action=3”, “xml”);
dhx_dataview.php file contents:
//dataview connector
include_once(“…/dhtmlx/connectors/dataview_connector.php”);
$data = new DataViewConnector($conn);
$data->dynamic_loading(7);
$qry = "SELECT a.product_id as id, a.product_title as title,a.product_desc as thedesc,
DATE_FORMAT( date_posted , ‘%d-%b-%Y’) as thedate, concat(firstname,’ ‘,lastname) as poster,zone_name as loc,
concat(price_currency,’ ‘,CONVERT(cast(format(product_price,0) as char) USING utf8) COLLATE utf8_bin) as price,
concat(’$sitepath’,‘’,if (image_path is NULL,‘$show_no_image’,image_path)) as img
FROM class_adverts a
left join class_members m on a.username=m.username
left join class_categories c on a.category_id = c.category_id
left join listing_images i on a.product_id = i.image_product_id AND image_category=‘$thecatletter’
left join zone z on a.product_loc = z.zone_id
WHERE suspended='n' ORDER BY date_posted DESC";
/* echo $qry;
exit();*/
$data->render_sql($qry, "id","title,thedesc,thedate,poster,loc,price,year_mileage,img");
Thanx in advance