[eluser]tonanbarbarian[/eluser]
i know this has fixed the problem
however if you want to know what the problem was it was your select and from commands
rather than
Code:
$this->db->select('s.*', 'u.*', 'c.*');
the select should just take a single parameter
Code:
$this->db->select('s.*, u.*, c.*');
and with the from there should be just a single parameter as well
Code:
$this->db->from('sms', 'AS s');
should be
Code:
$this->db->from('sms AS s');
I also agree that you are better off not using aliases if you can help it
it actually increases readability if you use the full table name
alias were necessary years ago when some database engines has a maximum limit on the lenght of a query string
most databases these days have sufficiently large query lengths that you do not need to worry about aliasing except in the cases when the database engine particularily requires them