Hey, wondering if any pro can help me , I get these errors in my article.php file and I need help fixing them.
Line 16 starts at " $amount_get "
Line 20 starts at " while($row "
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/ryangib1/public_html/files/newsys(undercon)/article.php on line 16
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/ryangib1/public_html/files/newsys(undercon)/article.php on line 20
<?php
$amount_get = mysql_query("SELECT * FROM comment WHERE articleid='" . $_GET['id'] . "'"); $comments = mysql_num_rows($amount_get);
$grab = mysql_query("SELECT * FROM articles WHERE id='" . $_GET['id'] . "' LIMIT 1");
while($row = mysql_fetch_array($grab)){
?>
Line 16 starts at " $amount_get "
Line 20 starts at " while($row "
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/ryangib1/public_html/files/newsys(undercon)/article.php on line 16
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/ryangib1/public_html/files/newsys(undercon)/article.php on line 20
<?php
$amount_get = mysql_query("SELECT * FROM comment WHERE articleid='" . $_GET['id'] . "'"); $comments = mysql_num_rows($amount_get);
$grab = mysql_query("SELECT * FROM articles WHERE id='" . $_GET['id'] . "' LIMIT 1");
while($row = mysql_fetch_array($grab)){
?>