Jump to content



Photo
* * * * * 2 votes

1064 - You have an error in your SQL syntax


This topic has been archived. This means that you cannot reply to this topic.
355 replies to this topic

#101   bobsi18

bobsi18
  • Members
  • 438 posts

Posted 18 March 2006 - 04:18

Hi guys, I've been reading through the post and have a smiliar problem... On my catalogue side of things (on the index.php page), I am getting the following error (instead of a list of products):

1064 - You have an error in your SQL syntax near '-_oscommerce' at line 1

show table status from domainname_com_au_-_oscommerce

[TEP STOP]

Please please please does anyone know what's happening?

Thanks, Barbara


please - does anyone know where i can look for help????

#102   enigma1

enigma1
  • Members
  • 8,206 posts

Posted 27 March 2006 - 02:45

there is no table status with the default osc dbase so you have to figure out what script/contributions are using this table. Probably something you installed?

#103   lee30

lee30
  • Members
  • 17 posts

Posted 29 March 2006 - 05:13

Thanks Charles,

I have finally fixed this error after the host upgraded my site to a new mysql version.

No more headaches now, your help is much appreciated.

Lee

#104   LadyShelly

LadyShelly
  • Members
  • 34 posts

Posted 02 April 2006 - 21:06

Yep.

I'm offical confused and at wits end with this one.

Okay, so I've been fighting with getting PayPal orders to work. Thought I got it fixed. Logged in with my "test customer's name" after sucessfully sending money and purchasing items. Got the Order Sucess, got the emails, ect. So I log into 'My Account', click on Order History and bam!

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 '-10, 10' at line 1

select o.orders_id, o.date_purchased, o.delivery_name, o.billing_name, ot.text as order_total, s.orders_status_name from orders o, orders_total ot, orders_status s where o.customers_id = '20' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '1' order by orders_id DESC limit -10, 10

So, I look this error, find this thread. Try the fix.

Now I'm getting negative page numbers, no error, and 0 of 0 orders in admin. When I first log into admin, it actually says 2 pending orders, but when I try to view them.... nothing 0 of 0.

What did I do and how do I fix it? /crying.gif' class='bbc_emoticon' alt=':'(' />

Edited by LadyShelly, 02 April 2006 - 21:07.


#105   n2advnture

n2advnture
  • Members
  • 144 posts

Posted 03 April 2006 - 10:39

So, I look this error, find this thread. Try the fix.

Now I'm getting negative page numbers, no error, and 0 of 0 orders in admin. When I first log into admin, it actually says 2 pending orders, but when I try to view them.... nothing 0 of 0.

What did I do and how do I fix it? /crying.gif' class='bbc_emoticon' alt=':'(' />


That's exactly what I get on the admin side.

If a custome logs in and view his/her "order history" nothing shows up as well.

~M

#106   john_spiral

john_spiral
  • Members
  • 5 posts

Posted 05 April 2006 - 08:20

Thanks for the tip, fixed error with CCGV1.51a contribution
/smile.gif' class='bbc_emoticon' alt=':)' />

#107   Load-This

Load-This
  • Members
  • 62 posts

Posted 18 April 2006 - 06:33

Hey All,

I have added the fix into the /admin/split_page_results.php

It fixes up the tep errors ... but when someone has an order thats "Pending" .. or any of the other status's that used to display the tep error, it now doesnt display anything.

I have 2 "Pending" orders, but they are not displaying in the "Pending" table?

Any help?

#108   LadyShelly

LadyShelly
  • Members
  • 34 posts

Posted 29 April 2006 - 05:21

Just an update.... I still haven't got the negative pages fixed.

I have nearly reinstalled my entire oscommerce site, with the exception of the style page and index page... it's still there and I really don't know why since I copied the originals back over the changes to the split pages...

It just boggles the mind.... /huh.gif' class='bbc_emoticon' alt=':huh:' />

#109   glamourfish

glamourfish
  • Members
  • 250 posts

Posted 15 May 2006 - 15:53

/ohmy.gif' class='bbc_emoticon' alt=':o' /> NOTE - I have NOT asked you to change catalog/includes/classes/split_page_results.php - If you have a problem on the catalog side you may want to try the same change in that file - I did and it went wrong so the change to my catalog/includes/classes/split_page_results.php file is a little more elaborate and I will share that here if it becomes an issue - but for now it seems people will mostly have a problem with empty files on the admin side.

hth

Charles


I am 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 '-20, 20' at line 1

nothing following when I am trying to update my data base importing it directly into my mySQL db via my control panel. Never had this before...any ideas:?
if at first you do succeed...try not to look surprised!

#110   runweb

runweb
  • Members
  • 166 posts

Posted 22 May 2006 - 12:03

Uh - lots of 1064 errors...

Here is my little Problem when I have products with a

"

in the description text an someone is ont the products page of this product:

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 'D&W", Sondermodell")' at line 1

insert into user_tracking (customer_id, full_name, session_id, ip_address, time_entry, time_last_click, last_page_url, page_desc) values ('', 'Guest', 'fa43eae0b6caf7a74c44353025863b8f', '84.170.74.243', '1148299179', '1148299179', '/webshop/catalog/product_info.php?products_id=1079',"Ford Escort MK II Zakspeed "D&W", Sondermodell")


Anyone an idea, what I could change do avoid this error message at the bottom of my shop.. ?
OSC Webmakers Edition modiefied with many other contribs and enhancements.
+ STS 4.5.7 for 2.2MS2 and RC1

#111   janice171

janice171
  • Members
  • 190 posts

Posted 31 May 2006 - 13:58

Hi,
I have a similar problem, but can't find a resolve in these forums..
can anyone help out?

here's what i get in admin/specials

Specials
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, s.specials_id, s.specials_new_products_price, s.specials_date_added, s.specials_last_modified, s.expires_date, s.date_status_change, s.status from products p, specials s, products_description pd where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = s.products_id order by pd.products_name limit -6, 6

[TEP STOP]

#112   amgelettronica

amgelettronica
  • Members
  • 5 posts

Posted 31 May 2006 - 14:10

Hello, I would be interested to use its contribution but it turns out not working because side admin exits 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 * from discount_coupons cd order by cd.date_end, date_start limit -20, 20

[TEP STOP]


I have controlled the code, but I do not succeed to find errors.

I use mysql 4.1.12, creed I am a fix of mysql. .I do not succeed to understand where. Someone can help me?

On my package I have istalled the TotalB2B, works equally? Thanks You

Mimmo

#113   enigma1

enigma1
  • Members
  • 8,206 posts

Posted 31 May 2006 - 21:47

Hello, I would be interested to use its contribution but it turns out not working because side admin exits 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 * from discount_coupons cd order by cd.date_end, date_start limit -20, 20

[TEP STOP]
I have controlled the code, but I do not succeed to find errors.

I use mysql 4.1.12, creed I am a fix of mysql. .I do not succeed to understand where. Someone can help me?

On my package I have istalled the TotalB2B, works equally? Thanks You

Mimmo


Have you installed the fix mentioned here? There is also a bug report.
http://www.oscommerc...unity/bugs,1605

And it's best to get the latest osc update that includes many other fixes.
http://www.oscommerc...tions/downloads

#114   amgelettronica

amgelettronica
  • Members
  • 5 posts

Posted 02 June 2006 - 17:50

Ok, Thanks you. Resolved.

Mimmo /thumbsup.gif' class='bbc_emoticon' alt=':thumbsup:' />

#115   cdllt

cdllt
  • Members
  • 16 posts

Posted 04 June 2006 - 15:16

Simplyeasier,
you are hero!
thank you so much for your help!
this is save my life /smile.gif' class='bbc_emoticon' alt=':)' />

#116   n2advnture

n2advnture
  • Members
  • 144 posts

Posted 04 June 2006 - 15:18

So, I look this error, find this thread. Try the fix.

Now I'm getting negative page numbers, no error, and 0 of 0 orders in admin. When I first log into admin, it actually says 2 pending orders, but when I try to view them.... nothing 0 of 0.

What did I do and how do I fix it? /crying.gif' class='bbc_emoticon' alt=':'(' />


Any answer for this one? /whistling.gif' class='bbc_emoticon' alt=':-"' />

#117   enigma1

enigma1
  • Members
  • 8,206 posts

Posted 11 June 2006 - 17:26

Any answer for this one? /whistling.gif' class='bbc_emoticon' alt=':-"' />

I've seen it with incorrect database transfering from an old osc version to a later one.

#118   marcoj

marcoj
  • Members
  • 8 posts

Posted 14 June 2006 - 12:01

hi there

i've been having the same problem but in the Newsletter Manager

"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 newsletters_id, title, length(content) as content_length, module, date_added, date_sent, status, locked from newsletters order by date_added desc limit -20, 20

[TEP STOP]"

i've tried the
"if ($offset < 0)
{
$offset = 0;
}

but it doesn't work.. can anyone help?

#119   enigma1

enigma1
  • Members
  • 8,206 posts

Posted 14 June 2006 - 16:39

hi there

i've been having the same problem but in the Newsletter Manager

"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 newsletters_id, title, length(content) as content_length, module, date_added, date_sent, status, locked from newsletters order by date_added desc limit -20, 20

[TEP STOP]"

i've tried the

"if ($offset < 0)
{
$offset = 0;
}

its the same fix.
1. Make sure you install it properly
2. Make sure you modify both files on catalog and admin ends.
but it doesn't work.. can anyone help?

Edited by enigma1, 14 June 2006 - 16:41.


#120   computerzenabled

computerzenabled
  • Members
  • 13 posts

Posted 27 June 2006 - 07:29

/thumbsup.gif' class='bbc_emoticon' alt=':thumbsup:' />

I honestly thought I wouldn't be able to fix the problem. But it was pretty easy to resolve.

Thanks!