Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SQL Error after deleteing all vendors


picnick

Recommended Posts

Hi there,

 

after I deleted all vendor-entries with the admintool, I get an SQL error. Maybe because the SELECT statement in the script needs a value. How can I get this right?

 

Maybe I can import a single "dummy" vendor.

 

Thanks for all help,

picnick

Link to comment
Share on other sites

Hi there,

 

after I deleted all vendor-entries with the admintool, I get an SQL error. Maybe because the SELECT statement in the script needs a value. How can I get this right?

 

Maybe I can import a single "dummy" vendor.

 

Thanks for all help,

picnick

 

What sort of SQL error?

If you're not having fun you're not doing it right

 

Teach a person to fish rather than give them a loaf of bread or however that saying goes.

Link to comment
Share on other sites

Hi there,

 

after I deleted all vendor-entries with the admintool, I get an SQL error. Maybe because the SELECT statement in the script needs a value. How can I get this right?

 

Maybe I can import a single "dummy" vendor.

 

Thanks for all help,

picnick

 

First thing find out what version of mySQL your server is running

 

If you are on a server with mySQL 4.1.xx you will may get this error when you delete all "anything" (vendors, customers, orders etc)

 

To fix it

 

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;

 

add

 

if ($offset < 0)

{

$offset = 0 ;

}

 

IN BETWEEN the lines above

 

The problem appears to be that mySQL 4.1.xx (Unlike older versions of the database) handles negative offsets correctly (by not accepting them as valid) :D

 

Charles

A kite flies highest AGAINST the wind !

 

"Life should NOT be a journey to the grave with the intention of arriving safely in an attractive and well preserved body, but rather to skid in sideways, a lover in one hand, martini in the other, body thoroughly used up, totally worn out and screaming ~ WOO HOO!! What a ride!"

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...