I am getting the following error on my home page. I am new to php code and this one is looking pathetic on my wordpress site. any help would be highly appreciated. The error is as below:
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given on line 39
The code on line 39 is as follows:
$post_db_table_name = $wpdb->prefix . "posts";
$total_deals = mysql_query("select p.* from $post_db_table_name p where p.post_type = 'seller' and p.post_status = 'publish' ");
$total_pages = mysql_num_rows($total_deals); *line 39*
$recordsperpage = $post_number;
$pagination = $_REQUEST['pagination'];
if($pagination == '') {
Please help me. Thank you very much in advance.