Open Classifieds - Support

Official community support and forum

Support Development Forum Rules Documentation Download Home

Register - lost password?

Open Classifieds - Support » Support » English
closed not resolved

SQL/DB Error

18 posts from 4 voices
  • Started 1 year ago by internetromania
  • Latest reply from bazo
  • This topic is closed
  • This topic is not resolved

Tags:

  • DB error
  • error
  • [email protected]
  • sql
  1. Admin

    Need professional help for Open Classifieds?

    Get a quick answer from our development team! Just for 50 EUR, premium support and many more things.
    Posted 1 year ago
  2. internetromania
    Member

    Reputation:28
     

    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]

    Posted 1 year ago #
  3. Chema
    Key Master

    Reputation:1,717
     

    I'm checking this as soon as I know I'll let you know

    Posted 1 year ago #
  4. Admin

    Posted 1 year ago
  5. Chema
    Key Master

    Reputation:1,717
     

    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

    Posted 1 year ago #
  6. internetromania
    Member

    Reputation:28
     

    ok, done

    I ll check if these emails will come again.

    thx

    Posted 1 year ago #
  7. Admin

    Posted 1 year ago
  8. Chema
    Key Master

    Reputation:1,717
     

    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.

    Posted 1 year ago #
  9. internetromania
    Member

    Reputation:28
     

    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...

    Posted 1 year ago #
  10. internetromania
    Member

    Reputation:28
     

    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...

    Posted 1 year ago #
  11. Chema
    Key Master

    Reputation:1,717
     

    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?

    Posted 1 year ago #
  12. internetromania
    Member

    Reputation:28
     

    THIS IS THE ENTIRE EMAIL, NEED HEADER?:)

    Posted 1 year ago #
  13. Chema
    Key Master

    Reputation:1,717
     

    doesn't say the script where the error happened? shit...

    Posted 1 year ago #
  14. internetromania
    Member

    Reputation:28
     

    it s all - no other word

    Posted 1 year ago #
  15. internetromania
    Member

    Reputation:28
     

    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...

    Posted 1 year ago #
  16. goldy
    Member

    Reputation:7
     

    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...

    Posted 1 year ago #
  17. Chema
    Key Master

    Reputation:1,717
     

    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

    Posted 1 year ago #
  18. bazo
    Member

    Reputation:20
     

    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

    Posted 1 year ago #
  19. Chema
    Key Master

    Reputation:1,717
     

    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

    Posted 1 year ago #
  20. bazo
    Member

    Reputation:20
     

    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

    Posted 1 year ago #
  21. bazo
    Member

    Reputation:20
     

    p.s. should I change line 30 in controller like above?

    Posted 1 year ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.


Open Classifieds - Support is proudly powered by bbPress. Design by Spyka.

Ask a new question