开发者

php and stored procedures where the error am I doing?

开发者 https://www.devze.com 2023-02-23 04:23 出处:网络
$b = mysql_query(\"CALL dene($sehir)\"); $sorgu = mysql_fetch_row($b); return $sorgu[6]; } $h=mysql_query(\"SELECT * FROM firmalar\");
$b = mysql_query("CALL dene($sehir)");
$sorgu = mysql_fetch_row($b);
return $sorgu[6];
}

$h=mysql_query("SELECT * FROM firmalar");
while($r=mysql_fetch_row($h)){
echo kadir($r[10]);
}

Why does a record that I created here in sp? A开发者_运维百科fter the first record from the error.

Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in C:\wamp\www.\deneme.php on line 9


It sounds like that one of these lines

$sorgu = mysql_fetch_row($b);
$h=mysql_query("SELECT * FROM firmalar");

is returning false

Check what error you get when you change these lines:

$b = mysql_query("CALL dene($sehir)") or die(mysql_error()) ;
$h=mysql_query("SELECT * FROM firmalar") or die(mysql_error()) ;

You say that the response is:

ISTANBULCommands out of sync; you can't run this command now

It sounds like that the contents of $sehir are being interpreted as a command. Maybe it is because (I think) the $sehir might have to be enclosed by ', so you need to use instead of this:

b = mysql_query("CALL dene($sehir)");

this:

b = mysql_query("CALL dene('$sehir')");
0

精彩评论

暂无评论...
验证码 换一张
取 消