Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

MySQL error in Shopping Cart.php


vashichino7

Recommended Posts

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!

Link to comment
Share on other sites

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.

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

Link to comment
Share on other sites

@@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 by vashichino7
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...