vashichino7 Posted July 10, 2013 Posted July 10, 2013 Hey Guys, I just noticed when I add an item to the cart then I come to remove the cart making it empty, I see the following error: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /XXXX/public_html/shopping_cart.php on line 236 Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /XXXX/public_html/shopping_cart.php on line 264 What is this from? Any help fixing this? Thank you! Quote
Jack_mcs Posted July 10, 2013 Posted July 10, 2013 It's impossible to say without more to go on. In the least you would need to mention what oscommerce version you are using, assuming the shopping cart file has not been edited, or show the code at those lines, +/- 10 lines. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
vashichino7 Posted July 10, 2013 Author Posted July 10, 2013 (edited) @@Jack_mcs - I do apologize. I am using v.2.3.3 and have edited some checkout options. my website is www.savingshub.com - you can try and add a file and remove it, the error will show. Here are the lines $allow_mod_array = array(); line 236 -while($rec = mysql_fetch_array($query)){ if(empty($allow_mod_array)) $startedempty = true; $methods_array = array(); $methods_array = explode(';',$rec['payment_methods']); if(!empty($methods_array)){ foreach($methods_array as $method){ $allow_mod_array[] = $method; } } if($startedempty){ here are the lines for 264: <?php line 264: if (mysql_num_rows($query)==0 || in_array('checkout_by_amazon',$allow_mod_array)) { // AMAZON CODE -> START require_once("checkout_by_amazon/checkout_by_amazon_util_dao.php"); $utilDao = new UtilDAO(); $utilDao->printButton(); // AMAZON CODE -> END } ?> Edited July 10, 2013 by vashichino7 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.