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

[eluser]jmadsen[/eluser]
if you

echo $this->db->last_query();

I think you'll see that your concats are producing:

Code:
CONCAT(users.firstname, `users`.`surname)` as article_author

you see the problem with the ` ? This is what I get when I try to test - first check that it is your same issue.

If you add FALSE like below, it should not protect your query and get rid of the problem
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', FALSE);

of course, if you weren't using Active Record you never would have had a problem with "hidden" characters ;-)


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