cannot change value of a field (if other field contains '@')
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>
- *Attachment: [limerick.sqlite](https://storage.googleapis.com/google-code-attachments/phpliteadmin/issue-84/comment-0/limerick.sqlite)*
Comments (3)
-
Account Deleted -
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
-
- Log in to comment
``` 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