+ Reply to Thread
Results 1 to 3 of 3

Thread: Mysql error on AddListing.php

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

    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
    Senior Member
    Join Date
    Oct 2019
    Location
    Hungary
    Posts
    141
    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
    Senior Member
    Join Date
    Oct 2019
    Location
    Hungary
    Posts
    141
    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.

+ Reply to Thread