Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / SQL Error.... can anyone advise me on this?

SQL Error.... can anyone advise me on this?

Locked

Views: 596

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
21 Apr 2010, 8:20 PM
#1
mrcastle avatar

mrcastle

Zen Follower

Join Date:
Feb 2010
Posts:
205
Plugin Contributions:
0

SQL Error.... can anyone advise me on this?

Just moved my cart over to a new server... everything seems to be working ok except when I click on the "new products" link I get a sql 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 'SELECT p.products_id, p.products_type, pd.products_name, p.products_image, p.pro' at line 1
in:
[select count(*) as total SELECT p.products_id, p.products_type, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status, p.master_categories_id FROM zen_products p LEFT JOIN zen_manufacturers m ON (p.manufacturers_id = m.manufacturers_id), zen_products_description pd WHERE p.products_status = 1 AND p.products_id = pd.products_id AND p.master_categories_id != 10 AND pd.language_id = 1 and p.products_date_added >=20100121]

=============================

If I click on the show all inventory link everything is there. I went into php admin and checked the database... it doesn't appear to have any issues. I click on the repair database icon just to be sure but no problems. Is it possible a php file didn't copy over properly ? I'm not a programmer but hope some one can help explain it in layman's terms. Thanks for any and all advice.....

21 Apr 2010, 8:52 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: SQL Error.... can anyone advise me on this?

The problem is not in your database.
Something is wrong in your PHP files causing it to send bad queries to the database.
Did you check for sure whether it was working correctly on the old server? If it was, then maybe your PHP files didn't upload properly. But, judging by the query quoted it seems more like something's broken than missing.

22 Apr 2010, 5:26 AM
#3
mrcastle avatar

mrcastle

Zen Follower

Join Date:
Feb 2010
Posts:
205
Plugin Contributions:
0

Re: SQL Error.... can anyone advise me on this?

Thanks Dr. Byte - since I'm a newbie I decided from the start that (in addition to backing up) every time I was about to change a php file, I would leave a copy of it in the directory with a "bak" extension. It really helped me today...... I started to rename those bak files until the culprit (header_php.php) revealed itself. Anyways, I'm pretty happy how that worked out and just wanted to let other newbies know how I was able to resolve the problem. Of course, you might be asking why the heck a non-programmer is messing around with php files and my answer would be 'because they're there' haha.