Welcome Guest, Not a member yet? Register   Sign In
Active Record trouble
#2

[eluser]Phil Sturgeon[/eluser]
You have two things here I can notice here at first glance.

The first is not an error, just an oddity. You are using from twice. The 2nd overrides the first useage, so you don't need both.

The 2nd problem is that you are using a field name as a value. It will look at the field name as a string, as you may notice by the different quotes. Back tick (`) is a field, apostrophe is a string value.

For your wheres to work, try:

Code:
$this->db->where_raw('sga_sgq_id=sgq_id');
$this->db->where('sga_id',560);

That might not be spot on as im going from memory (at work, bored) but should get you in the right direction.


Messages In This Thread
Active Record trouble - by El Forum - 08-21-2008, 08:22 AM
Active Record trouble - by El Forum - 08-21-2008, 08:50 AM
Active Record trouble - by El Forum - 08-22-2008, 04:46 AM
Active Record trouble - by El Forum - 11-15-2008, 06:04 PM
Active Record trouble - by El Forum - 11-15-2008, 08:19 PM



Theme © iAndrew 2016 - Forum software by © MyBB