EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: nprioleau on March 09, 2016, 11:45:11 AM



Title: Using $_GET with EasyUI not working
Post by: nprioleau on March 09, 2016, 11:45:11 AM
I want to build an embedded grid. I have success with the master detail but when trying to get the detail records, I don't get a result. I am using PHP Version 5.6.3. My code returns a json_result if I run it on it's own. The code as follows:

<?
require('kernal.php');

$itemid=mysqli_real_escape_string($db, $_REQUEST['id']);
print $itemid;
//print $itemid;
//$itemid=$_REQUEST['id'];
//print $itemid;
// Get sales
$getRows = $db->query(sprintf("SELECT *, p.prod_productID, p.prod_productName FROM sales_detail inner join products p on p.prod_productID = salesd_productID WHERE salesd_salesID = '$itemid' GROUP BY salesd_ID")) or SQLError();

while($row = $getRows->fetch_assoc()) {
    $rows[] = $row;
}
$smarty->assign('rowsNum', $total);
$smarty->assign('rows', $rows);
echo json_encode($rows);

?>

I have more or less copied the code from the demo site.
Can anyone help me please?


Title: Re: Using $_GET with EasyUI not working
Post by: stworthy on March 10, 2016, 08:44:25 AM
Please make sure your code can return the correct json data back to the browser.