i wrote a query to retrieve values from database by joining two table, but it throws error.
following is the SQL query which i have written.
if ($selected_key_type != null ) {
$o = ORM::factory('organization')->join_table('keywords_organization','keywords_organization.organization_id', 'organization.id')->where('keywords_organization.keyword_id',$selected_key_type);
}
Following is the error being displayed
Fatal error: Call to a member function where() on a non-object in /var/www/xxxx/html/application/controllers/organizations.php on line 51
Any help would be appreciated :)