Welcome Guest, Not a member yet? Register   Sign In
Compare two variables of differents tables with active record..
#1

[eluser]masentinel900[/eluser]
Hello everyone, In this moment I want to do a comparation of two differents tables for may use it like result.

So
Code:
$this -> db -> select('*');
$this -> db -> from('functions, users');
$this -> db -> where('idprofile=' . 'createdby');
$query = $this -> db -> get();
return $query;

I'm doing a table that to show two varables of the functions table but I have a row in the database which is "createdby" and its a number, But I want that show the name of the person, For this I have a foreign key, from the createdby row from functions to idprofile from users. So I want that Instead of to show the number of createdby. Show the name of the person about to the corresponding.

Someone that may help me please. Ideas!!!


Messages In This Thread
Compare two variables of differents tables with active record.. - by El Forum - 11-16-2012, 01:33 PM



Theme © iAndrew 2016 - Forum software by © MyBB