Post by markdat » Wed May 29, 2013 8:17 pm

Error log:

PHP Notice: 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 1<br />Error No: 1064<br />SELECT COUNT(DISTINCT p.product_id) AS total FROM product p LEFT JOIN product_description pd ON (p.product_id = pd.product_id) LEFT JOIN product_to_store p2s ON (p.product_id = p2s.product_id) LEFT JOIN product_tag pt ON (p.product_id = pt.product_id) WHERE pd.language_id = '2' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' AND () in /home/content/44/7109344/html/store/system/database/mysql.php on line 49

Can anyone help me to fix it ?

Thanks in advance!
Markdat
OC 1.5.3.1

Newbie

Posts

Joined
Wed May 29, 2013 8:09 pm

Post by Avvici » Wed May 29, 2013 9:39 pm

Had you just upgraded to 1.5.3.1 ? Make sure there is a ; at the end of the SQL statement. Without seeing your actual function it's hard to tell. Many have had the same issue because they either edited the code, or have a version of OC that did actually forget a ;

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by markdat » Wed May 29, 2013 10:03 pm

Hi avvici -arvixe,

No it was a clean install of the OC 1.5.3.1. Do you know if a SQL command via myphpadmin can fix it? If yes please let me know how can I do that?

Thanks again,
Markdat

Newbie

Posts

Joined
Wed May 29, 2013 8:09 pm

Post by rph » Wed May 29, 2013 10:36 pm

Looks like a bug if filter_name or filter_tag is white space. I haven't tested this but you can try editing /catalog/model/catalog/product.php and changing:

Code: Select all

if (!empty($data['filter_name']) || !empty($data['filter_tag'])) {
to:

Code: Select all

if ((isset($data['filter_name']) && utf8_strlen(trim($data['filter_name'])) > 0) || (isset($data['filter_tag']) && utf8_strlen(trim($data['filter_tag'])) > 0)) {

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by markdat » Wed May 29, 2013 11:33 pm

Hi Ryan,

Thank you very much for trying help me but this change not solved the problem.

Best wishes,
Markdat

Newbie

Posts

Joined
Wed May 29, 2013 8:09 pm

Post by rph » Wed May 29, 2013 11:49 pm

You need to post the search query that's triggering the error then.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by Avvici » Thu May 30, 2013 12:13 am

Like I said at the beginning. Why do we have to complicate things

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by rph » Thu May 30, 2013 12:20 am

Not sure what you mean. This is all default.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by markdat » Thu May 30, 2013 12:25 am

Ryan,

The above error only appears in the error log in the administration of the store. This error does not appear in the store. I've done several tests and was never presented in the store front.

How can I find the search query?

I´m a beginner in OC, so I´m sorry for many questions!

Thanks again,
Markdat

Newbie

Posts

Joined
Wed May 29, 2013 8:09 pm

Post by Avvici » Thu May 30, 2013 2:15 am

rph wrote:Not sure what you mean. This is all default.
Forget it. Not important. I'm pretty sure I know what the issue is but it seems you've got a handle on it. Moving on...

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by markdat » Thu May 30, 2013 8:42 pm

Hello friends,

New errors yesterday!

Error log:

2013-05-29 20:22:42 - PHP Warning: unlink(/home/content/44/7109344/html/store/system/cache/cache.product.2.0.1.08102527af66a44e4d84545270b01c11.1369884047) [<a href='function.unlink'>function.unlink</a>]: No such file or directory in /home/content/44/7109344/html/store/system/library/cache.php on line 14
2013-05-29 20:22:42 - PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at /home/content/44/7109344/html/store/index.php:104) in /home/content/44/7109344/html/store/system/library/session.php on line 11
2013-05-29 20:22:42 - PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/content/44/7109344/html/store/index.php:104) in /home/content/44/7109344/html/store/system/library/session.php on line 11
2013-05-29 20:22:42 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/content/44/7109344/html/store/index.php:104) in /home/content/44/7109344/html/store/index.php on line 184
2013-05-29 20:22:42 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/content/44/7109344/html/store/index.php:104) in /home/content/44/7109344/html/store/system/library/currency.php on line 45

Any help will be welcome!

Thanks again,
Markdat

Newbie

Posts

Joined
Wed May 29, 2013 8:09 pm

Post by rph » Fri May 31, 2013 3:25 am

You can ignore that error.

There was an issue with the code I originally wrote so you must have just been looking at the old error. I've updated it so try that. (Make sure to clear your error log first.)

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by markdat » Fri Jun 07, 2013 1:24 pm

Thank you my friend!

Solved this matter just with an update of the VQMOD for last version.2.3.2.

Best regards,
Markdat O0

Newbie

Posts

Joined
Wed May 29, 2013 8:09 pm
Who is online

Users browsing this forum: No registered users and 101 guests