Welcome Guest, Not a member yet? Register   Sign In
Active Record question
#1

[eluser]Unknown[/eluser]
Hi,

I have a SQL statement that works fine but I want to re-create it using Active Record so I make the SQL safer etc. Here is my current SQL is it possible to re-create this?

Code:
$query = $this->db->query("SELECT p.*, a.*, c.* from databaseTableOne p JOIN databaseTableTwo a ON a.UniqueID = p.UniqueID INNER JOIN databaseTableThree c ON p.UniqueID = c.UniqueID WHERE p.UniqueID = '".$var."' AND p.Deleted = '0' LIMIT 1");

Update*

Found this post that should solve the issue I was having

http://ellislab.com/forums/viewthread/109045/




Theme © iAndrew 2016 - Forum software by © MyBB