Welcome Guest, Not a member yet? Register   Sign In
Database select a set value
#1

[eluser]excitedcroc[/eluser]
Hi, couldnt find anything with the search about this so thought I'd ask...

Im trying to do a select like below to return all the fields of a table + a certain value (a_value) in this case.

Code:
$this->db->distinct();
$this->db->select( "p.*, 'a_value' as value" );
$this->db->from( "table p" );


Now this works in mysql but I think CI is escaping the quotes or something. I've tried \' but it still won't work!

Any ideas whats going wrong here ?

Many thanks..


Messages In This Thread
Database select a set value - by El Forum - 08-19-2010, 01:07 PM
Database select a set value - by El Forum - 08-19-2010, 01:33 PM



Theme © iAndrew 2016 - Forum software by © MyBB