Possible Duplicate:
Warning: mysql_fetch_* expects parameter 1 to be resource, boolean given error
I'm having a little practice regarding mysql stored procedures. Here is the php file which calls it:
<?php
include('conn.php');
$cor=$_POST['course'];
$sql="CALL list('$cor')";
$result=mysql_query($sql);
?>
<table>
<tr>
<th>Name</th>
<th>Course</th>
</tr>
<?php
while($row=mysql_fetch_assoc($result)){
?>
<tr>
<td><?php echo $row['Name']; ?></td>
<td><?php echo $row['Course']; ?></td>
</tr>
<?php } ?>
</table>
Ve burada ben heidi sql bunu çalıştırdığınızda iyi çalışır saklı yordam var:
CREATE PROCEDURE `list`(IN `COR` VARCHAR(50))
LANGUAGE SQL
NOT DETERMINISTIC
CONTAINS SQL
SQL SECURITY DEFINER
COMMENT ''
BEGIN
SELECT *
FROM tb1
WHERE Course=COR;
END
Please tell me how do I debug this one, I'm having this kind of error:
mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in
Ben sorgu hatalı olduğunu sanıyorum. lütfen yardım.