Title: Plugin broken &#8211; mysql_num_rows error
Last modified: August 22, 2016

---

# Plugin broken – mysql_num_rows error

 *  Resolved [tomaston](https://wordpress.org/support/users/tomaston/)
 * (@tomaston)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/plugin-broken-mysql_num_rows-error/)
 * Hi,
 * I’m using WP 4.0 and WooCommerce 2.2.8. I have installed and activated this plugin,
   but it does not appear to work. On the Abandoned Orders, Email Templates and 
   Recovered Orders tabs, I see the following error:
 * `Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given 
   in /Users/tom.aston/Sites/therockspush/public/wp-content/plugins/woocommerce-
   abandoned-cart/woocommerce-ac.php on line 612`
 * Is there a fix for this? Is there an updated version of the plugin on it’s way?
 * Many thanks
 * [https://wordpress.org/plugins/woocommerce-abandoned-cart/](https://wordpress.org/plugins/woocommerce-abandoned-cart/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Thread Starter [tomaston](https://wordpress.org/support/users/tomaston/)
 * (@tomaston)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/plugin-broken-mysql_num_rows-error/#post-5464986)
 * I’m afraid I can’t give you access – the site is local only at the moment.
 * I have just performed a new installation of WordPress 4.0 and added and activated
   WooCommerce 2.2.8 and WooCommerce Abandon Cart Lite Plugin 1.1. No other plugins
   activated; no products added; nothing else. I still receive the error
 * `Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given 
   in /Users/tom.aston/Sites/cleanwp/public/wp-content/plugins/woocommerce-abandoned-
   cart/woocommerce-ac.php on line 612`
 * Any ideas? Has anyone else had this issue?
 *  [bhavik.kiri](https://wordpress.org/support/users/bhavikkiri/)
 * (@bhavikkiri)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/plugin-broken-mysql_num_rows-error/#post-5465005)
 * Hi,
 * We are unable to replicate the issue on our server, but we tried to apply fix
   for you from the warning you have mentioned in your post.
 * Can you please give us your email address so we can send you the zip file which
   contains the fix for the issue mentioned by you? Fix is untested as we could 
   not replicate issue on our server.
 * Thanks,
    Bhavik Kiri
 *  Thread Starter [tomaston](https://wordpress.org/support/users/tomaston/)
 * (@tomaston)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/plugin-broken-mysql_num_rows-error/#post-5465006)
 * Hi,
 * I have emailed you at [tickets@tychesoftwares.uservoice.com](https://wordpress.org/support/topic/plugin-broken-mysql_num_rows-error/tickets@tychesoftwares.uservoice.com?output_format=md)
 * Many thanks,
    Tom
 *  [peter](https://wordpress.org/support/users/dewebbouwmeester/)
 * (@dewebbouwmeester)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/plugin-broken-mysql_num_rows-error/#post-5465038)
 * Hello all,
    I get the same error ( mysql_num_rows() expects parameter 1 to be
   resource at line 612) in WP4.0, WC 2.2.6 and Abandoned Cart 1.1.
 * In this case it’s a multisite setup and that causes issues when quering the user
   table: ‘$wpdb->prefix’ will include the ID of the sub-site whereas the user table
   is prefixed by ‘$wpdb->base_prefix’ only.
    Same construction on line 671 needs
   to be changed as well. Also in send_email.php, line 138. As soon as i apply this
   fix, my abandoned orders show up again – at least in multisite.
 * Hope this helps.
 * Kind regards,
    Peter
 *  Plugin Author [Vishal Kothari](https://wordpress.org/support/users/ashokrane/)
 * (@ashokrane)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/plugin-broken-mysql_num_rows-error/#post-5465040)
 * Hello Peter,
 * Thank you for the fix.
 * This bug has also been fixed in version 1.2 that was released yesterday.
 * Regards,
    Vishal Kothari
 *  [peter](https://wordpress.org/support/users/dewebbouwmeester/)
 * (@dewebbouwmeester)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/plugin-broken-mysql_num_rows-error/#post-5465041)
 * Hi Ashok!
    Thanks for your quick reply! I should have noticed the newer version.
   Sorry about that.
 * I’ve immediately tried it but the same problem occurs.
    Version 1.2 still uses‘…”.
   $wpdb->prefix.”users AS…’ on some lines. In a multisite setup this results in
   a table name like ‘wp_999_users’. But there are no sub-site user tables. Only
   1 shared user table exists for all sub-sites and this table can be refered to
   in your query as ‘$wpdb->**base**_prefix.”users’. When i apply this ‘base’ fix
   to version 1.2, the abandoned carts are listed again as expected. Or am i missing
   a point?
 * Kind regards,
    Peter
 *  Plugin Author [Vishal Kothari](https://wordpress.org/support/users/ashokrane/)
 * (@ashokrane)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/plugin-broken-mysql_num_rows-error/#post-5465042)
 * Hi Peter,
 * I get your point. Your issue is specific to multi-site installs.
 * We will apply your fix to the next version & try to release it in next couple
   of days.
 * :Vishal
 *  [peter](https://wordpress.org/support/users/dewebbouwmeester/)
 * (@dewebbouwmeester)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/plugin-broken-mysql_num_rows-error/#post-5465043)
 * Hi Vishal,
    Thanks for you quick reply and i’ll look forward to the next version!
   Cheers, Peter

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Plugin broken – mysql_num_rows error’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-abandoned-cart/assets/icon-256x256.png?rev=2369396)
 * [Abandoned Cart Lite for WooCommerce](https://wordpress.org/plugins/woocommerce-abandoned-cart/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-abandoned-cart/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-abandoned-cart/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-abandoned-cart/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-abandoned-cart/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-abandoned-cart/reviews/)

 * 8 replies
 * 0 participants
 * Last reply from: [peter](https://wordpress.org/support/users/dewebbouwmeester/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/plugin-broken-mysql_num_rows-error/#post-5465043)
 * Status: resolved