MySQL Forums
Forum List  »  Stored Procedures

error when executing procedure from PHP
Posted by: sdfv sdfv
Date: February 04, 2006 07:16AM

Hi,

I created a stored procedure in Mysql 5.0 (test()). It works.
Now i tried to execute it with PHP (5.0), but i get the error:
"Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in c:\storedprocMy.php on line 5"

Thanks for helping
maisql


The code:
<?php
$link = mysql_connect("localhost", "root", "xxx")
or die("Impossible de se connecter : " . mysql_error());
$dbsel = mysql_select_db('reserv', $link);
$result = mysql_query($link,"call test()");
while ($row = mysql_fetch_assoc($result)) {
$nom = $row['logon'];
$resnr = $row['resnr'];
echo $nom;
echo $resnr;
echo "<br>";
}
mysql_close($link);
?>

Options: ReplyQuote


Subject
Views
Written By
Posted
error when executing procedure from PHP
4099
February 04, 2006 07:16AM
1725
June 15, 2006 04:14AM
1619
June 15, 2006 07:05AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.