How to convert this so it works with mysqli?
pastebin link is http://pastebin.com/raw.php?i=CZT9JXAH
$rows = $_GET["jqgrid_page"] * $_GET["rows"];
$sidx = $_GET['sidx']; // get index row – i.e. user click to sort
$sord = $_GET['sord']; // get the direction
// same sql as in select_command
$rs = mysql_fetch_assoc(mysql_query("SELECT SUM(total) as s FROM (SELECT total FROM invheader ORDER BY $sidx $sord LIMIT $rows) AS tmp"));
foreach($data["params"] as &$d)
$d["running_total"] = $rs["s"];
// you can also use grid object to execute sql, useful in non-mysql driver
$rs = $grid->con->execute("MY-SQLi query");
The grid uses php adodb library and it return recordset object.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?