TottoBennington Posted January 19, 2012 Share Posted January 19, 2012 Can anyone help me? <?php function get_articles() { $articles = array (); $query = mysql_query("SELECT ´article_id´ , ´article_title´ , ´article_likes´ FROM ´articles' "); while (($row = mysql_fetch_assoc($query)) !=false){ echo $row ['article_title'] , '<br />'; } } ?> MOD EDIT: . . . tags added, circus fonts removed. Quote Link to comment https://forums.phpfreaks.com/topic/255390-mysql_fetch_assoc-expects-parameter-1-to-be-resource-boolean-given-in/ Share on other sites More sharing options...
Andy-H Posted January 19, 2012 Share Posted January 19, 2012 $query = mysql_query("SELECT ´article_id´ , ´article_title´ , ´article_likes´ FROM ´articles' "); // nope, error on this line ' should be ´ like below $query = mysql_query("SELECT ´article_id´ , ´article_title´ , ´article_likes´ FROM ´articles´"); function get_articles() { $articles = array (); $query = mysql_query("SELECT ´article_id´ , ´article_title´ , ´article_likes´ FROM ´articles´ ")or return false; while (($row = mysql_fetch_assoc($query)) !=false){ echo $row ['article_title'] , '<br />'; } } Quote Link to comment https://forums.phpfreaks.com/topic/255390-mysql_fetch_assoc-expects-parameter-1-to-be-resource-boolean-given-in/#findComment-1309418 Share on other sites More sharing options...
Pikachu2000 Posted January 19, 2012 Share Posted January 19, 2012 When posting code, enclose it within the forum's . . . BBCode tags. Quote Link to comment https://forums.phpfreaks.com/topic/255390-mysql_fetch_assoc-expects-parameter-1-to-be-resource-boolean-given-in/#findComment-1309432 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.