Jump to content

Resourse ID #86


rockyastime1

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.