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 '-6, 6' at line 1 select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from products p, products_description pd, specials s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and s.status = '1' order by s.specials_date_added DESC limit -6, 6 [TEP STOP]
1064 - You have an error in your SQL syntax
#261
Posted 26 July 2008, 04:54
#264
Posted 30 July 2008, 22:41
I how to do fix my page???? 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 'where p.products_status = '1' and pd.products_id = p.products_id and pd.language' at line 1 select count(p.products_id) as total from ((products p, products_description pd, manufacturers m ) left join specials s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '17' [TEP STOP]
#265
Posted 05 August 2008, 05:25
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 'limit 0, 20' at line 1
limit 0, 20
then I got error under catalog like this:
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' at line 1
select p.products_image, pd.products_name, p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join specials s on p.products_id = s.products_id, products_to_categories p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '21' order by pd.products_name limit , 20
I did that fix what was listed on 1st page that didnt fix it.
also I wanted to add in my server info for anybody so they can help me:
Server OS: Linux 2.6.24-19-server Database: MySQL 5.0.51a-3ubuntu5.1
Server Date: 08/05/2008 01:27:33 Datebase Date: 08/05/2008 01:27:33
Server Up Time: 01:27:33 up 17 days, 11:16, 0 users, load average: 0.00, 0.00, 0.00
HTTP Server: Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.3 with Suhosin-Patch mod_ssl/2.2.8 OpenSSL/0.9.8g mod_perl/2.0.3 Perl/v5.8.8
PHP Version: 5.2.4-2ubuntu5.3 (Zend: 2.2.0)
Edited by kustomjs, 05 August 2008, 05:28.
#266
Posted 07 August 2008, 05:54
When I migrate one site which is run on old version MySQL, version 3.23, to a new MySQL vesion5.0, I got the following error. The scrip works fine the old version MySQL, but not the new one.
1054 - Unknown column 'a.authors_id' in 'on clause'
select a.articles_id from articles a, articles_to_topics a2t left join topics_description td on a2t.topics_id = td.topics_id left join authors au on a.authors_id = au.authors_id, articles_description ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '1' and td.language_id = '1' and a.articles_date_added > SUBDATE(now( ), INTERVAL '30' DAY)
I am new to this. Please help me here.
#267
Posted 20 August 2008, 23:06
This trick fixed all of my problems in the admin and catalog!
#268
Posted 27 August 2008, 15:21
I receive this error when trying to edit a product under admin:
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 'on p.products_id = ptdc.products_id, products_description pd where p.products_id' at line 1
select pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_qty_blocks, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id, p.products_free_shipping, ptdc.discount_categories_id from products p, products_to_discount_categories ptdc on p.products_id = ptdc.products_id, products_description pd where p.products_id = '145' and p.products_id = pd.products_id and pd.language_id = '1'
[TEP STOP]
#269
Posted 02 September 2008, 17:43
Tried the "fix" but nothing helped.
Still getting 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 'now(),'O:12:"shoppingcart":5:{s:8:"contents";a:1:{i:30;a:1:{s:3:
INSERT INTO TABLE_IDEAL_PAYMENTS (transaction_id, entrancecode, issuer_id, order_id, payment_status, date_last_check,cart_contents) values (0, '5d51bcac5b21016d26d2ed8788f7c6d5',0151,55, ,now(),'O:12:"shoppingcart":5:{s:8:"contents";a:1:{i:30;a:1:{s:3:"qty";s:1:"1";}}s:5:"total";d:1;s:6:"weight";d:0;s:6:"cartID";N;s:12:"content_type";s:8:"physical";}')
[TEP STOP]
This is when the user confirmes the payment.
Google search brings me nowhere but on this forum
plz help.
Edited by peter4stra, 02 September 2008, 17:46.
#270
Posted 05 September 2008, 13:36
I only get this in my admin (orders) page when reviewing an invoice that has a product that has been deleted.
Quote
select ota.*, pta.products_text_attributes_name from orders_text_attributes as ota, products_text_attributes as pta where ota.orders_id = 1890 and ota.products_id = and pta.products_text_attributes_id = ota.products_text_attributes_id
[TEP STOP]
I tried "Simplyeasier" fix but does not work for this.
Thanks for any ideas!
#271
Posted 25 September 2008, 12:27
I have a bit different error and I get it only when my session in Admin part ends. Here it is:
File: catalog/admin/admin_account.php
When I'm not logged in (ie. login timeout) and try to access the account modification page, 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 'and g.admin_groups_id=' at line 1 select a.admin_id, a.admin_firstname, a.admin_lastname, a.admin_email_address, a.admin_created, a.admin_modified, a.admin_logdate, a.admin_lognum, g.admin_groups_name from admin a, admin_groups g where a.admin_id= and g.admin_groups_id= [TEP STOP]Note that when i'm logged in, so after i log in again, everything works fine.
Any ideas ?
#272
Posted 25 September 2008, 22:38
GDS
#273
Posted 03 October 2008, 09:09
Xcom82, on Sep 25 2008, 01:27 PM, said:
I have a bit different error and I get it only when my session in Admin part ends. Here it is:
File: catalog/admin/admin_account.php
When I'm not logged in (ie. login timeout) and try to access the account modification page, I get the following error:
Note that when i'm logged in, so after i log in again, everything works fine.
Any ideas ?
I've just had this error on an oscMax install - the host server had Register Globals set to 'off' and I had incorrectly applied one of the osC Register Globals patches (I forgot to amend the admin sessions function). Once I applied the patch correctly it all works
Try adding in a Register Globals fix and see what happens
Graeme
#274
Posted 12 October 2008, 17:11
Simplyeasier, on Apr 1 2005, 09:10 AM, said:
First off - this fix is actually already recorded in the contributions section and many thanks to those who recorded it - but I don't think it is a contribution - rather a tip - Secondly the same problem has arisen for 4 people in a few days and I dare say it will happen to more as hosts migrate their mySQL databases to version 4.1.xx -
Hence I post here
If you get an error whilst creating \ modifying your database such that thro admin you delete all entries on a particular table you will likely get this message
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
followed by something like
select manufacturers_id, manufacturers_name, manufacturers_image, date_added, last_modified from manufacturers order by manufacturers_name limit -20, 20
or
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
depending on which table you have deleted all records from.
To fix this
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;
MySQL 4.1.xx handles negatives correctly (by forcing an error) in the code above unlike earlier versions of MySQL.
Change (catalog/includes/classes/split_page_results.php around line 67) from:
$this->sql_query .= " limit " . $offset . ", " . $this->number_of_rows_per_page;to:
$this->sql_query .= " limit " . max($offset, 0) . ", " . $this->number_of_rows_per_page;
Both on the catalog side and the admin side changing $offset to max($offset, 0) is the "official" fix.
hth
Charles
Hi,
I used your fix which worked great for one of the two errors i have, can you tell me how to fix this error, this error list below only shows up when i want to edit a product from the admin side ONLY.. No error on the catalog side???????????
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 'from products p, products_description pd where p.products_id = '185' and p.produ' at line 1
select p.products_name, p.products_description, p.products_url, p.products_keywords, p.products_metadescription, p.products_pagetitle, p.products_id, p.products_quantity, p.products_model, p.products_image, p.product_image_2, p.product_image_3, p.product_image_4, p.product_image_5, p.product_image_6, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id, from products p, products_description pd where p.products_id = '185' and p.products_id = pd.products_id and pd.language_id = '1'
Thank you
#275
Posted 08 November 2008, 14:25
#276
Posted 21 November 2008, 19:29
-Home <----error at here
-Category 1
----Sub 1
----Sub 2
-------Sub 1 <----- error at here
-------Sub 2 <----- error at here
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 '' at line 1
SELECT `manufacturers_name` FROM `manufacturers` WHERE manufacturers_id =
[TEP STOP]
can anyone help please, thanks?
#277
Posted 30 November 2008, 04:36
Tom
#278
Posted 03 December 2008, 21:57
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 '(pd.products_name like '%e%' or p.products_model like '%e%' or m.manufacturers_n' at line 1
select count(distinct p.products_id) as total from products p left join manufacturers m using(manufacturers_id) left join specials s on p.products_id = s.products_id, products_description pd, categories c, products_to_categories p2c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and ((pd.products_name like '%a%' or p.products_model like '%a%' or m.manufacturers_name like '%a%')(pd.products_name like '%e%' or p.products_model like '%e%' or m.manufacturers_name like '%e%')(pd.products_name like '%a%' or p.products_model like '%a%' or m.manufacturers_name like '%a%') )
Solution please?
#279
Posted 04 December 2008, 14:19
---------------------------------------
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 ''78'')' at line 1
INSERT INTO products_to_products_extra_fields (products_id, products_extra_fields_id, products_extra_fields_value) VALUES ('163', '99', '78'')
Anyone ?
#280
Posted 09 December 2008, 17:14
MYSQL QUERY ERROR REPORT
---------------------------------------
#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 '' at line 1
DROP TABLE IF EXISTS zones;
CREATE TABLE zones (
zone_id int NOT NULL auto_increment,
zone_country_id int NOT NULL,
zone_code varchar(32) NOT NULL,
zone_name varchar(56) NOT NULL,
PRIMARY KEY (zone_id)
);
1. Not sure this is the correct way to import .sql file.
2. do i need to drop the zone table first?
3. what should i do now?
4. Beside replacing this sql file, do i still need to change any coding on other php?
Please anyone kindly to help/guide me. Thanks.
Edited by fishgal2, 09 December 2008, 17:15.














