I am sending an SQL UPDATE query, and the mySQL database is behaving strangely. It returns a successful response, but 0 rows are affected. The code is:
UPDATE place
SET city='Qatar' AND country='Qatar'
WHERE placeid='25'
Response: Successful 0 row(s) affected. ( Query took 0.0003 sec )
There is definitely a record with placeid=’25’ in the database. If I do a SELECT * FROM place WHERE placeid=’25’ I get the record returned.
Any ideas?
thanks!
EDIT:
Table structure:
SQL query: describe place;
Rows: 9
Field Type Null Key Default Extra
title text NO NULL
description text NO NULL
latitude float NO NULL
longitude float NO NULL
image text NO NULL
placeid int(11) NO PRI NULL
country text YES NULL
city text YES NULL
address text YES NULL
Try with this :
Because your
ANDsounds strange in your query.