Jump to content

PHP mySQL Stored Procedure


diex

Recommended Posts

mySQL Version : 5.0.19-nt

PHP : 5.1.4

 

I cant do this! :'(

When I run the following code I always get an unexptected end. My query works from the mySQL command prompt. Even if I remove everything after $query I still get the unexpected end. It looks like PHP is not supporting the stored procedure.

 

<? 

include("sqlConnect.php"); 
$query1 = ("call sp_Performance_RevA_Change ('miamiprobe'));
$result1 = mysql_query($query1);
$num=mysql_numrows($result1);
$i=0;
while ($i < $num) {
// this where I want to assign the return values.
}

?>

 

 

So if I can not get that to work... is it possible to do the acutal stored procedure in php? Anyone assist? Thanks

 

SELECT * 
FROM
`http_get_performance_daily`
Inner Join `probe_reva_upgrade` ON `http_get_performance_daily`.`probeName` = `probe_reva_upgrade`.`ProbeName`
WHERE
`http_get_performance_daily`.`ProbeName` = location AND
`http_get_performance_daily`.`Date` >= date_sub(`probe_reva_upgrade`.`Date`, interval 10 day) AND
`http_get_performance_daily`.`Date` <= date_sub(`probe_reva_upgrade`.`Date`, interval -10 day)
order by
`http_get_performance_daily`.`Date` ASC;

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/45608-php-mysql-stored-procedure/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.