I tested this situation on my system:
Create table t1 (
f1 int,
f2 varchar(10),
f3 varchar(10));
Filled this table with a couple of data.
Then executed the following query (on the command line, not in some PHP script, which adds the risq of other errors):
insert into t1 (f1, f2, f3) select '10', f3, f2 from t1;
Result:
Query OK, 4 rows affected (0.00 sec)
Records: 4 Duplicates: 0 Warnings: 0
mysql> select * from t1;
+------+----------+----------+
| f1 | f2 | f3 |
+------+----------+----------+
| 1 | valeur 1 | VALEUR 1 |
| 2 | valeur 2 | VALEUR 2 |
| 3 | valeur 3 | VALEUR 3 |
| 4 | valeur 4 | VALEUR 4 |
| 10 | VALEUR 1 | valeur 1 |
| 10 | VALEUR 2 | valeur 2 |
| 10 | VALEUR 3 | valeur 3 |
| 10 | VALEUR 4 | valeur 4 |
+------+----------+----------+
8 rows in set (0.00 sec)
This was done in mysql version 4.0.18 (Linux)
My reference book - which covers "only" version 3.22 - (MySQL&msql from O'Reilly&Associates) stated "... you cannot insert into the table you are selecting from".
So, this is definitely version-dependent!
JJ Mouris