2010-10-26 4 views
0

que je fais une requête MySQL similaire à ce qui suit:tableau croisé Mysql mise à jour des problèmes d'autorisation

UPDATE my_articles a 
LEFT JOIN categorylinks cl ON a.pageid = cl.cl_from 
     SET a.importance = 'High' 
    WHERE cl.cl_to = 'High' 

Le problème est, je n'ai pas (je droit UPDATE pour la table categorylinks ont ce droit pour my_articles), de sorte que la requête échoue avec le message

UPDATE command denied to user 'svick'@'willow.toolserver.org' for table 'categorylinks' 

Comment puis-je travailler autour de cela?

Répondre

1

Je le ferais avec Select inside Update.

Quelque chose comme ça (non testé):

UPDATE my_article a 
SET a.importance = 'High' 
WHERE a.page_id IN(SELECT cl.cl_from FROM categorylinks cl WHERE cl.cl_to='High') 
+0

Merci, ça fonctionne. – svick

+0

Glad, je pourrais aider. Bonne chance pour votre projet. – mlusiak