theres an error: Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'call insertion()' (11004) in C:\wamp\www\www.P002.com\includes\member_signup.php on line 3 heres my line 3 mysql_connect('call insertion()'); the stored procedure runs in mysql browser... DELIMITER $$ DROP PROCEDURE IF EXISTS `profilesasiapacific`.`insertion` $$ CREATE PROCEDURE `profilesasiapacific`.`insertion` () BEGIN SELECT COUNT(*) FROM member; END $$ DELIMITER ; please need help badly
Whoops, I made a booboo higher up sorry Yeah that shouldnt be mysql_connect, it should be mysql_query Apologies :S
when i type $a = mysql_query('call StoredProc()'); var_dump($a); PHP: output: bool(false); the dump doesn't recognize the syntax....
$mysqli=new mysqli("Hostname","username","password","database"); $res_new=array(); $Query1="";$Query="";$result1=0; $url="sciencedaily.com"; $Query1="call GetExpert_last('$url')"; echo $Query1; echo "<br/>"; $res = $mysqli->query("$Query1"); if(mysqli_num_rows($res)>0) { $row = mysqli_fetch_row($res); $res = $row[0]; echo $res; }
Hi , this is sample stored procedure call $mysqli=new mysqli("Hostname","username","password","database"); $res_new=array(); $Query1="";$Query="";$result1=0; $url="sciencedaily.com"; $Query1="call GetExpert_last('$url')"; echo $Query1; echo "<br/>"; $res = $mysqli->query("$Query1"); if(mysqli_num_rows($res)>0) { $row = mysqli_fetch_row($res); $res = $row[0]; echo $res; } Edit/Delete Message