Hi
I'm getting an "Incorrect use of UPDATE" for this query :
UPDATE newpages AS t1
LEFT JOIN page_types AS t2 ON t2.type_id = t1.type_id
SET t1.rank = ( SELECT @num := @num +1 )
WHERE t2.type_code = 'p'
ORDER BY t1.rank ASC ;
I've read some stuff online that said I could use JOIN in an UPDATE but I can't see what I'm doing wrong.
can anyone help ?
thanks