Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

A BUG IN BANNER MANAGEMENT ???


nemiroff

Recommended Posts

Posted

Dear All,

 

I would like to design some banners to put the page where the banners change everytime when someone visits the page.

 

First of all, I found the relevant cell from the header page and changed the code as below,

 

<td><?php echo tep_display_banner('static', $banner); ?></td>

 

After, I erased the oscommerce banner from admin panel which was the start of my problems. First from the control panel I am receiving this 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 banners_id, banners_title, banners_image, banners_group, status, expires_date, expires_impressions, date_status_change, date_scheduled, date_added from banners order by banners_title, banners_group limit -20, 20

 

[TEP STOP]

 

It seems that the error is caused because the value for banner is 0 in SQL. Or simply, I don't know why.

 

Addition to that, I received the second error from the page as

 

TEP ERROR! (tep_display_banner(static, ) -> Banner with ID '' not found, or status inactive

 

Now, I found myself in oscommerce forums and waiting your help to solve above problem. It is appreciated.

 

Thanks, HELP ME PLEASEE!!!

ALP.

Posted

 

 

Yesss!!, great thanks for this link. It has the solution for MYSQL syntax error.

 

But, I have another question right now. Sometimes still I have connection errors and I can't solve it is due to server or due to codes or anything

 

In fact, the real question

 

For which MySQL version those codes will work best ??

 

4.1 or 5.0 ???

What are your experiences, share pls...

Posted

Connection errors is a generic term and no one can really answer it without the exact error. If it's intermittent, it's probably a query limit imposed by your host.

 

MySQL 5 will give you more trouble than MySQL 4, but OSC can run on both. Many contributions may break with MySQL 5, depending on how it's configured.

Contributions

 

Discount Coupon Codes

Donations

Archived

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

×
×
  • Create New...