Yep use an IF statement in the update like so,
mysql> update photos set default_val = if (file_id = '3udu',1,0) where property_id = 1;
Query OK, 1 row affected (0.05 sec)
Rows matched: 3 Changed: 1 Warnings: 0
mysql> select * from photos;
+------+---------+-------------+-------------+
| id | file_id | default_val | property_id |
+------+---------+-------------+-------------+
| 1 | 3434 | 0 | 1 |
| 2 | 343c | 0 | 1 |
| 3 | 3udu | 1 | 1 |
+------+---------+-------------+-------------+
3 rows in set (0.00 sec)
Andrew Gilfrin
------------------
http://gilfster.blogspot.com
My MySQL related Blog
http://www.mysqldevelopment.com
MySQL Stored Procedure,Trigger, View.... (Just about most things these days) Information