osCommerce Updates!

osCommerce has been released, with changes to the MySQL layer. If you are getting messages like:

PHP Warning:  mysql_num_rows() expects parameter 1 to be resource, object given in ...


Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource

then simply change the call “mysql_num_rows” to “tep_db_num_rows” in the following places:

osCommerce Better Together includes/modules/order_total/ot_better_together.php line 418(if using Buy Both Now, line 389)
osCommerce Quantity Discounts includes/modules/order_total/ot_quantity_discount.php line 547
osCommerce Big Chooser includes/modules/order_total/ot_big_chooser.php lines 55 and 1220
osCommerce Big Spender includes/modules/order_total/ot_bigspender_discount.php lines 48 and 716
osCommerce Table Discounts includes/modules/order_total/ot_table_discounts.php lines 131 and 566

So the old code looked like this:

        $this->_check = mysql_num_rows($check_query);

the new code will look like this:

        $this->_check = tep_db_num_rows($check_query);

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.