rockyastime1 Posted April 3, 2009 Share Posted April 3, 2009 Hello all, you might have come across this situation when dealing with PHP Mysql. Resourse ID #86 i have piece of code in my app, some thing goes like this $sql = 'select count(*) from wp_posts where year(post_date)="'.$yr.'"'; $count=mysql_query($sql); echo $count; Its giving me the output as resourse ID #86, its not an Error. Its returning an array. to show the desired output give echo $count[0];.... (instead of echo $count;) I hope it may help you. Link to comment https://forums.phpfreaks.com/topic/152342-resourse-id-86/ Share on other sites More sharing options...
PFMaBiSmAd Posted April 3, 2009 Share Posted April 3, 2009 Read what the mysql_query returns - http://us3.php.net/mysql_query It does not directly return the data from the query. You must fetch the data from the result resource. Link to comment https://forums.phpfreaks.com/topic/152342-resourse-id-86/#findComment-800073 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.