Welcome Guest, Not a member yet? Register   Sign In
Concat and join?
#1

[eluser]Wonder Woman[/eluser]
Hello,

I want to concat two fields together but I am having trouble with the query containing joins...

Code:
$this->db->select('*, news.id as news_id, news.created as created_on, CONCAT(users.firstname, users.surname) as article_author, CONCAT(modified_user.firstname, modified_user.surname) as modified_author');
$this->db->join('users', 'users.id = news.author', 'left');
$this->db->join('users modified_user', 'modified_user.id = news.modified_by', 'left');

Any idea how I can fix this? Thanks


Messages In This Thread
Concat and join? - by El Forum - 06-21-2011, 04:00 AM
Concat and join? - by El Forum - 06-21-2011, 04:45 AM
Concat and join? - by El Forum - 06-21-2011, 04:51 AM
Concat and join? - by El Forum - 06-21-2011, 05:02 AM
Concat and join? - by El Forum - 06-21-2011, 05:05 AM
Concat and join? - by El Forum - 06-21-2011, 05:16 AM
Concat and join? - by El Forum - 06-21-2011, 05:30 AM
Concat and join? - by El Forum - 06-21-2011, 05:32 AM
Concat and join? - by El Forum - 06-21-2011, 05:37 AM
Concat and join? - by El Forum - 06-21-2011, 05:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB