Hi Michael,
Thanks for guiding me to the rite direction, I went to wpdb page and found a solution. It has explaned everything.
Thanks,
James
I used get_results aswell, however, in output it is showing up the same single result, where as the output is 3 records. If you see following code the result for post_count is coming up 3 but for mypost it showing up single record, how do I print all the 3 results?
function my_posts()
{
global $wpdb;
$checkpost = $wpdb->get_results(“SELECT record_content as mypost, COUNT( record_id ) as post_count FROM wp_my_posts WHERE my_ID =’15′” );
foreach($checkpost as $checkposts)
{echo $checkposts->post_count;
echo $checkposts->mypost;
}
}