MySQL服务器版本语法错误

时间:2015-05-17 17:56:10

标签: php mysql

因此,当我检查cPanel时,我的网络服务器似乎已经升级,它说明了以下内容 -

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 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 status = 2' at line 1' in advert_search.php:122 Stack trace: #0 advert_search.php(122): PDOStatement->execute() #1 {main} thrown in advert_search.php on line 122

此代码之前正在运行,所以有人知道我需要什么版本或者如何将其更改为现在正常工作?

错误 -

            //Count The Results
            $count = $conn->prepare("SELECT COUNT(ref) FROM adverts WHERE location IN ($qMarks) AND status = 2");
            $count->execute();
            $count = $count->fetchColumn();

Php -

package Base;
import java.util.Scanner;

public class Game {

    public static void main(String[] args) {

        Scanner input = new Scanner(System.in); 

        System.out.println("Unscrammble the          state capitols:\n");       
        System.out.println("NNLSIGA");

        String Answer = input.nextLine();

        if("Lansing".equals(Answer));
        else {
            System.out.println("Hint: Capitol of the     Great Lake State");
            Answer = input.nextLine();

            if("Lansing".equals(Answer));
            else System.out.println("Try again");

            System.exit(0);
        }

        System.out.println("INNOAPASL");

        Answer = input.nextLine();

        // next question    

0 个答案:

没有答案
相关问题