+ Reply to Thread
Results 1 to 8 of 8

Thread: Mysql error on AddListing.php

  1. #1
    Master
    Join Date
    Apr 2017
    Location
    Tehran/Iran
    Posts
    464

    Mysql error on AddListing.php

    I got below error on error log

    10 Oct 12:09:38 | 73 repeats | Mysql 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 `Type` = 'picture' LIMIT 1' at line 1 on line# 658 (file: /includes/classes/AddListing.php)

    After some investigation, i found the problem and solution. There were not quotes arround {$this->listingID}

    Go to includes/AddListing.php

    Line #1065 #1083 and #1103

    Find:
    Code:
    Only registered members can view the code.
    Change:
    Code:
    Only registered members can view the code.
    Find:
    Code:
    Only registered members can view the code.
    Change:
    Code:
    Only registered members can view the code.
    Find:
    Code:
    Only registered members can view the code.
    Change:
    Code:
    Only registered members can view the code.
    Last edited by Bahram Soltanirad; October 10, 2019 at 12:36 PM.

  2. #2
    Master
    Join Date
    Oct 2019
    Location
    Hungary
    Posts
    302
    17 Sep 03:17:41 | 1 repeats | Mysql 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 `Plan_ID` = 26 AND `Type` = 'limited' LIMIT 1' at line 1 on line# 156 (file: /includes/classes/AddListing.php)

    If I turn off ad posting without registration then an MSQL error, if I turn it on so I don't have to register to post ads then it's fine.


    Where can the error be and what?
    Last edited by Jenő Kocsi; September 17, 2020 at 09:12 PM.

  3. #3
    Master
    Join Date
    Oct 2019
    Location
    Hungary
    Posts
    302
    I found out what is causing this error. If I set up only one plan package, posting without registration will not work. If I set up at least two plan packages then it will work, save error.

  4. #4
    Junior Member
    Join Date
    Aug 2021
    Posts
    1
    Hello
    I get a mysql error when I want to save while adding or editing products. How can I solve the problem?

  5. #5
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    2,340
    Hello,

    You need to create a ticket to look into the error

  6. #6
    Senior Member
    Join Date
    Apr 2019
    Posts
    150
    Hello,

    I've added some listings in my demo site. I get a MYSQL ERROR when I save after editing some of them.
    How can I find the cause of this error?

  7. #7
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    2,340
    Hello,

    you need to enable debugging mode in includes > config.inc.php > RL_DEBUG > true

  8. #8
    Senior Member
    Join Date
    Apr 2019
    Posts
    150
    Quote Originally Posted by Rudi View Post
    Hello,

    you need to enable debugging mode in includes > config.inc.php > RL_DEBUG > true
    Thank you!

+ Reply to Thread