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

[eluser]champs[/eluser]
If it's not taking to anything, it's the spaces. I've never used that style, but here's how I would write the same query:

Code:
<?php
$this->db->select('*');
$this->db->select('diary.id AS diaryID');
$this->db->from('diary');
$this->db->join('jobs',    'jobs.id=diary.jobID');
$this->db->join('users',   'users.id=diary.userID');
$this->db->join('clients', 'clients.id=jobs.clientID');
$this->db->limit(0, 30);
?>

... and don't let anyone tell you to just use straight queries/bindings :p


Messages In This Thread
mySQL into Active Record - by El Forum - 07-10-2007, 06:29 AM
mySQL into Active Record - by El Forum - 07-10-2007, 07:06 AM
mySQL into Active Record - by El Forum - 07-10-2007, 07:07 AM
mySQL into Active Record - by El Forum - 07-10-2007, 07:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB