I received this error from time to time, what s happening?
............................................
<b>SQL/DB Error</b>
(1064) in line 56 error: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 ( c.idCategory=9 or c.idCategoryParent=9)' at line 4
Query: SELECT count(p.idPost) total FROM oc_posts p
inner join oc_categories c
on c.idCategory=p.idCategory
where p.isAvailable=1 and p.isConfirmed=1 and p.type=all and ( c.idCategory=9 or c.idCategoryParent=9)
File: /index.php
PHP 5.2.9 (Linux)
Aborting...
...............................................
email arrived from [email protected]
I'm checking this as soon as I know I'll let you know
I think I might now what's wrong.
please open controller.php and in line 30:
change it for this: elseif (isset($_SESSION['type'])&&is_numeric($_SESSION['type'])) $type=$_SESSION['type'];//by session
and let us know something please. Since I never got such an error :S
regards
ok, done
I ll check if these emails will come again.
thx
I see you are installing the script at many places, version 1.6.1 is coming ;) it's really easy to update don't worry.
Erro persist
The same email comes from
"[email protected]" <[email protected]>
.......................................................................
<b>SQL/DB Error</b>
(1064) in line 56 error: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 'desc LIMIT 0, 12' at line 8
Query: SELECT p.idPost,p.title,p.description,p.insertDate,
c.Name category,c.idCategoryParent,p.type,p.price,p.password,
(select Filename from oc_postsimages where idPost=p.idPost order by FileName asc Limit 1) image
FROM oc_posts p
inner join oc_categories c
on c.idCategory=p.idCategory
where p.isAvailable=1 and p.isConfirmed=1
order by desc LIMIT 0, 12
File: /index.php
PHP 5.2.9 (Linux)
Aborting...
right now it s comming another email, check this:
.........................................................................
<b>SQL/DB Error</b>
(1064) in line 56 error: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 4
Query: SELECT count(p.idPost) total FROM oc_posts p
inner join oc_categories c
on c.idCategory=p.idCategory
where p.isAvailable=1 and p.isConfirmed=1 and p.type=all
File: /index.php
PHP 5.2.9 (Linux)
Aborting...
The first one it's a different error. Can you try to execute the sql in phpmyadmin? for example
The 2nd one still the same...please can you send the entire email where says where the error was produced?
THIS IS THE ENTIRE EMAIL, NEED HEADER?:)
doesn't say the script where the error happened? shit...
it s all - no other word
Email Full
Subject: ERROR 256
From:
"[email protected]"
<b>SQL/DB Error</b>
(1064) in line 56 error: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 'desc LIMIT 0, 8' at line 8
Query: SELECT p.idPost,p.title,p.description,p.insertDate,
c.Name category,c.idCategoryParent,p.type,p.price,p.password,
(select Filename from oc_postsimages where idPost=p.idPost order by FileName asc Limit 1) image
FROM oc_posts p
inner join oc_categories c
on c.idCategory=p.idCategory
where p.isAvailable=1 and p.isConfirmed=1
order by desc LIMIT 0, 8
File: /index.php
PHP 5.2.9 (Linux)
Aborting...
hello, i receive this error too in my email
ERROR 256
<b>SQL/DB Error</b>
(1064) in line 56 error: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 c.idCategory=54' at line 4
Query: SELECT count(p.idPost) total FROM oc_posts p
inner join oc_categories c
on c.idCategory=p.idCategory
where p.isAvailable=1 and p.isConfirmed=1 and p.type=all and c.idCategory=54
File: /index.php
PHP 5.2.0-8+etch16 (Linux)
Aborting...
you need to find out where this errors are happening, since it's a bit weird, also try the query in you query executer, to see if they work.
regards
Hi Guys
I got plenty of these 1064 errors in the course of trying to reconstitute old DB content into new 1.6 DB. Double check that the FKey relations are exactly as stated in /install/sql php. double check your categories havent been adjusted or added new categories that dont match the new DB and doubl check the number of _posts;_categories; _images agrees with the next increment number stated in structure. Maybe?
bazo
Hi,
Bazo: you don't need to change anything in the DB from previous version to make it work in 1.6. actually that's the fun part the DB remains exactly the same, just changes the frontend and more functionality.
regards
Hi Chema, these problems, for me, arose from my site being hacked and OC 1.5 just disappeared a week ago. Dont know why, dont know who. I had a bak of the .sql file but still trying to get everything back together and working properly. Good learning process for me also, although i didnt learn espagnol yet. I really like the improvements to appearance of 1.6. eventually will have to incorporate google adsense again. Will have to name it other than your adsense tho.
bazo
p.s. should I change line 30 in controller like above?
This topic has been closed to new replies.