At 14:30 +0100 6/5/03, Moj Bordel wrote:
>Hello,
>I'm not really sure (I'm by no means an expert) but
>shouldn't this be possible?
>UPDATE test set i_test=item.i_itemID WHERE
>test.i_ID=item.i_itemID;
>I'm getting this reply:
>"MySQL said:
>Unknown table 'item' in where clause"
>while of course table 'items' exists...
>I use mySQL service at my webhosting, so I don't have
>the control over the database.
No statement is possible if you use incorrect syntax. :-)
Assuming you have a version of MySQL recent enough to support
multiple-table updates, it's necessary to name all the tables before
the SET keyword. Try:
UPDATE test, item set i_test=item.i_itemID WHERE
test.i_ID=item.i_itemID;
>
>Thanx
>
>Marc
--
Paul DuBois
http://www.kitebird.com/
sql, query