EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
September 15, 2025, 03:28:21 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
call store procedure
Pages: [
1
]
« previous
next »
Print
Author
Topic: call store procedure (Read 4979 times)
irn-id
Newbie
Posts: 1
call store procedure
«
on:
July 09, 2014, 08:32:29 PM »
haii all,
how to call store procedure,
this my code:
store procudure mysql:
name cus1
begin
select * from customer where cusdate>=startdate and cusdate<=endate
end
name cus2
begin
select count(*) from customer where cusdate>=startdate and cusdate<=endate
end
my data grid..:
$page = isset($_POST['page']) ? intval($_POST['page']) : 1;
$rows = isset($_POST['rows']) ? intval($_POST['rows']) : 20;
$sort = isset($_POST['sort']) ? strval($_POST['sort']) : 'datein';
$order = isset($_POST['order']) ? strval($_POST['order']) : 'asc';
$offset = ($page-1)*$rows;
$result = array();
$rs = mysql_query("CALL cus2('$starfrom','$endfrom')");
$row = mysql_fetch_row($rs);
$result["total"] = $row[0];
$rs = mysql_query("CALL cus1('$starfrom','$endfrom'), order by $sort $order limit $offset,$rows");
$rows = array();
while($row = mysql_fetch_object($rs)){
array_push($rows, $row);
}
$result["rows"] = $rows;
echo json_encode($result);
i try ,..but data grid = empty
please..help..
thx..
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...