This question about wordpress cutom table..
I am creating a plugin I want to check a table named wp_school_post
table empty or not.
See my code below which throws the following error
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\getwp\wp-content\plugins\getwp_P\schools_post_function.php on line 7
**filled**
My code:
function schools_post_function()
{
// echo "Sachool POST function";
global $wpdb;
$result = $wpdb->get_results("SELECT postid from wp_school_post WHERE `postid` IS NOT NULL");
if(mysql_num_rows($result=='0'))
{
echo "not filled";
}
else
{
echo "filled";
}
}