cannot change value of a field (if other field contains '@')

Issue #84 duplicate
Former user created an issue

Originally reported on Google Code with ID 84 ```

What steps will reproduce the problem?

1. activate attached fil, activate table rym 2. In [Browse]-tab click on [Edit] for a particular row 3. Change a value in any field

What is the expected output?

change of field

What do you see instead?

Warning: SQLiteDatabase::query() [function.SQLiteDatabase-query]: unrecognized token: "@" in D:\xampp\htdocs\phpliteadmin.php on line 670

Error: not an error. This may be a bug that needs to be reported at code.google.com/p/phpliteadmin/issues/list

What version of the product are you using?

phpliteadmin 1.9.1. On what operating system? Windows running Xampp

Please provide any additional information below. One of the fields contain a emailadress.

Thank you for your help.....Eke van Batenburg (EkevanBatenburg2009@live.com)

```

Reported by `ekevanbatenburg` on 2012-01-16 14:32:07

<hr>

Comments (3)

  1. Former user Account Deleted

    ``` It appears that changing a field is also not possible as any of the other fields contain a dot ('.') in a text field.

    For example trying to change a field in the other table of the supplied example database limerick.sqlite, table 'klikkers' generates a similar error-message: Warning: SQLiteDatabase::query() [function.SQLiteDatabase-query]: near ".": syntax error in D:\xampp\htdocs\phpliteadmin.php on line 670

    ```

    Reported by `ekevanbatenburg` on 2012-01-16 14:44:17

  2. Former user Account Deleted

    ``` I found out that [Save changes]-submit generates the following command: UPDATE klikkers SET id=3, ip=127.0.0.1, datum=2012030115161925, kliks=4 WHERE ROWID=3

    Although the fields are text, the values are not enclosed in quotes, which results in an error (here for value 127.0.0.1). This also explains the problem when a field-value has other characters like space or @ or dots or # or whatever.

    I have temporarily corrected this by changing statement 2023: $query .= $db->quote($_POST[$pks[$i].":".$fields[$j]]); into $query .= "'".$db->quote($_POST[$pks[$i].":".$fields[$j]])."'";

    This solved the problem, but it is not a good solution, because the added quotes should only be added for TEXT and BLOB fields, not for numerical fields, but I do not know where the program stores these types.

    I hope this helps you to improve your beautiful program.

    Regards............Eke van Batenburg ```

    Reported by `ekevanbatenburg` on 2012-03-15 00:27:26

  3. Christopher Kramer

    ``` This is a duplicate of issue #75. The problem should be fixed in 1.9.2 therefore. ```

    Reported by `crazy4chrissi` on 2012-05-30 14:45:40 - Status changed: `Duplicate` - Merged into: #75

  4. Log in to comment