Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

2 error message on configuration


Guest

Recommended Posts

Posted

Ok, I get 2 different error messages in 2 different parts of the configuration. When I go to "customers", i get the following error:

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1

 

select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, a.entry_country_id from customers c left join address_book a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id order by c.customers_lastname, c.customers_firstname limit -20, 20

 

and when I go to "shipping" under modules I get the following error:

Parse error: parse error, unexpected $, expecting ',' or ';' in /home/greatgif/public_html/catalog/includes/modules/shipping/ups.php on line 72

 

I have been searching this forum for about an hour trying to find the same error message, but noone seems to have had them that I can see of. Can someone please help me?

TIA

Posted

This is the code for includes/modules/shipping/ups.php in a default osCommerce install, from line 69 to 73 (there's nothing on line 72 on a default install):

// class methods
   function quote($method = '') {
     global $HTTP_POST_VARS, $order, $shipping_weight, $shipping_num_boxes;

     if ( (tep_not_null($method)) && (isset($this->types[$method])) ) {

 

For your other error:

In admin/includes/classes find split_page_results.php and - BACK IT UP then find the lines

 

$offset = ($max_rows_per_page * ($current_page_number - 1));

$sql_query .= " limit " . $offset . ", " . $max_rows_per_page;

 

change to

 

$offset = ($max_rows_per_page * ($current_page_number - 1));

if ($offset < 0)

{

$offset = 0 ;

}

$sql_query .= " limit " . $offset . ", " . $max_rows_per_page;

 

Vger

Posted

Ok, neither of those will work, as it turns out I am missing everything from line 69 down on the shipping/ups.php file.........can you post the entire thing from line 69 down for me please?

The other one, the only lines in the split_page_results.php that start with $offset are the following:

= ($t$offsethis->number_of_rows_per_page * ($this->current_page_number - 1));

 

$this->sql_query .= " limit " . $offset . ", " . $this->number_of_rows_per_page;

}

 

That is line 65 to 68

I'm not sure if that is maybe what you were looking for????

Posted

oops, my mistake on the 2nd error, i wasn't looking in admin........so, all i need is line 69 on for the ups.php file.

Thanks!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...