boolean
Posts: 62
|
| Posted: 10/28/2010, 1:45 PM |
|
Hi there,
I am trying to use stored procedure in CCS for the first time, and it doesn't work.
I have a procedure which executes correctly in MySQL server
CREATE PROCEDURE `getPartInfo`(IN i_PartNo VARCHAR(25))
BEGIN
SELECT * FROM partinfo WHERE part_no = i_PartNo;
END;
In CCS, I have
$SQL = "CALL getPartInfo('1230')";
$db = new clsDBIntranetConn();
$db->query($SQL);
$rs = $db->next_record();
if ($rs)
{
$Result .= $db->f(0);
}
else
{
$Result .= "Failed: ".mysql_error()."<br>";
}
$db->closed();
The result is
Failed: PROCEDURE Intranetdb.getPartInfo can't return a result set in the given context
Would you please point out what I am doing wrong? Thanks alot.
|
 |
 |
|