Welcome Guest, Not a member yet? Register   Sign In
active record - simple mysql statement but not working
#1

[eluser]CI MikeD[/eluser]
Is it something I am missing here? Here is the part of the sql statement built with active record that is getting errors:

Quote:$this->db->where('DATE_ADD(CURRENT_DATE,INTERVAL 1 DAY)', 'ending');

CI returnes this error: An Error Was Encountered, Error Number: 1064

with this created part of mysql:
Code:
DATE_ADD(CURRENT_DATE,INTERVAL 1 DAY) 'ending'

So it fails to create equal sign (=). If I force the creation of = sign like this:
Quote:$this->db->where('DATE_ADD(CURRENT_DATE,INTERVAL 1 DAY)=', 'ending');

the error is the same event though query looks ok now. The most "funny" thing about all this is while CI reports error when i copy paste entire generated mysql to phpmyadmin it works.

above is only part of mysql query. any ideas?thanks.


Messages In This Thread
active record - simple mysql statement but not working - by El Forum - 01-10-2008, 07:53 AM
active record - simple mysql statement but not working - by El Forum - 01-10-2008, 08:15 AM
active record - simple mysql statement but not working - by El Forum - 01-10-2008, 08:34 AM
active record - simple mysql statement but not working - by El Forum - 01-11-2008, 02:37 AM
active record - simple mysql statement but not working - by El Forum - 01-11-2008, 03:04 AM
active record - simple mysql statement but not working - by El Forum - 01-11-2008, 06:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB