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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.