Welcome Guest, Not a member yet? Register   Sign In
Active Queries problem
#1

Here is my query

Code:
$this->db->select('amount AS SavingAmount');
$query  = $this->db>get_where('cashman_trial_balance',array('category_id'=>'176','clientId'=>$user['UserID'],'year'=>$year));

On checking in browser its generating this query below


Code:
SELECT *, *, `amount` AS SavingAmount FROM (`cashman_trial_balance`) WHERE `category_id` = '176' AND `clientId` = '122' AND `year` = '2015/2016'

I dont know from where the two stars coming from?

Controller code
Code:
$som_var = $this->client->statistics();

Model code
Code:
function statistics()
{

$b = $this->get_balances();
return $b
}
function get_balances()
{
$this->db->select('amount AS SavingAmount');
$query = $this->db->get_where('cashman_trial_balance',array('category_id'=>'176','clientI‌​d'=>$user['UserID'],'year'=>$year));
return $query->result();
}
Reply


Messages In This Thread
Active Queries problem - by codebigneer - 07-08-2015, 02:32 AM
RE: Active Queries problem - by gadelat - 07-08-2015, 07:38 AM
RE: Active Queries problem - by codebigneer - 07-08-2015, 09:36 PM
RE: Active Queries problem - by mwhitney - 07-09-2015, 10:01 AM
RE: Active Queries problem - by codebigneer - 07-15-2015, 12:15 AM
RE: Active Queries problem - by mwhitney - 07-15-2015, 07:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB