The Joomla! Forum ™



Forum rules


Please use the official Bug Tracker to report a bug: http://issues.joomla.org



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Dec 07, 2011 1:39 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Fri Sep 02, 2005 2:26 am
Posts: 171
Location: Portugal
I'm trying to update a table using a mysql query that relies on join but using the standard $query->update and $query->join, Joomla just ignores my joins.

Example:
Code:
...
$query->update('#__users AS u');
$query->join('LEFT', '`#__temp_users_check` AS fmt ON u.username = fmt.name');
$query->join('LEFT', '`#__tracker_users_level` AS ul ON ul.id = fmt.ugroup');
$query->set('u.id_level = fmt.ugroup');
$query->set('u.wait_time = ul.wait_time');
$query->where('u.id IN ( '.$uids.' )');
...


Expected result:
Code:
UPDATE #__users AS u LEFT JOIN #__temp_users_check AS fmt ON u.username = fmt.name LEFT JOIN #__tracker_users_level AS ul ON ul.id = fmt.ugroup SET u.id_level = fmt.ugroup , u.wait_time = ul.wait_time WHERE u.id IN ( 3,4,6,8 )


Given result:
Code:
UPDATE #__users AS u SET u.id_level = fmt.ugroup , u.wait_time = ul.wait_time WHERE u.id IN ( 3,4,6,8 )


Is this the expected behavior (the Given result), a bug, or my error?

Note: Just opened a tracker issue.

_________________
http://www.metpage.org | http://www.visigod.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 



Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group