
4 Apr
2013
4 Apr
'13
12:06 p.m.
Suppose I have a tasks table which contains tasks created by several people and where each task can be assigned to any other user, with columns like these: status - A string value, can be Open, In Progress or Closed created_by - int value, stores the id of the user who created the task assigned_to - int value, stores the id of the user assigned to a task And I want to see only open tasks created by or assigned to me, i.e. the query: SELECT * FROM tasks WHERE status = 'Open' AND (created_by = 3 OR assigned_to = 3) How can I do this using CodeIgniter ActiveRecord? -- Regards, Peter Karunyu -------------------