No matching results being reported as error

Issue #52 resolved
Former user created an issue

Originally reported on Google Code with ID 52 ``` What steps will reproduce the problem? 1. Run an SQL Query where no matching results will be found. 2. 3.

What is the expected output? What do you see instead? You would expect the system to report no results. It actually comes back with the message: There is a problem with the syntax of your query (Query was not executed) Infact the syntax is fine, its just that for the chosen criteria there are no matches.

What version of the product are you using? On what operating system? 1.8.6 on Linux

Please provide any additional information below.

```

Reported by `mike.thinkingspace` on 2011-07-21 18:29:32

Comments (3)

  1. Dane Iracleous

    ``` I'll handle this one. ```

    Reported by `diracleo` on 2011-08-23 18:37:38 - Status changed: `Fixed`

  2. Andreas Lagerkvist

    ``` I have the same problem in 1.8.7 on Ubuntu. From this query:

    SELECT * FROM existing_table WHERE 1 = 2

    I get this:

    There is a problem with the syntax of your query (Query was not executed).

    However, it's not just in PHPLiteAdmin, I'm unable to execute a query with zero results from my own code as well (the PDO class throws the same error). ```

    Reported by `powerbuoy` on 2011-12-01 01:38:25

  3. Andreas Lagerkvist

    ``` I dug through the code and found the error. The same code is used in two places and in one place it's been fixed (with a comment stating this bug was fixed) but in the second place it hasn't.

    Fixed here:

    3138: 22 August 2011: gkf fixed bugs 46, 51 and 52. 3139: if($isSelect && $result >= 0)

    Not fixed here:

    1969: if($isSelect && $result)

    I still don't understand why PDO returns false and its errorInfo() says "syntax error". ```

    Reported by `powerbuoy` on 2011-12-01 04:21:38

  4. Log in to comment