Welcome Guest, Not a member yet? Register   Sign In
permission issue
#7

[eluser]alexaaaaaaaaaa[/eluser]
[quote author="jmadsen" date="1285481502"]I think you are asking how to get the "where date less than 1 month old" part into your query?

if so, checkout this post:

http://ellislab.com/forums/viewthread/161642/#776549[/quote]
hi thanks for the link but i was able to do something like this it didn't work
here's my code
Quote:$buyer_id = $this->loggedInUser->id;
$cond3 = $this->loggedInUser->id;

$this->db->like('project_type', '3');
$this->db->from('projects');

$days = date( 'm,Y', time() );
$cond1 = '%m,%Y';
$cond2 = $days;
$res = $this->admin_model->getProjects12($cond1,$cond2,$cond3);


in my model i have this


function getProjects12($cond1='',$cond2='',$cond3='')
{
$query = "SELECT * FROM projects WHERE FROM_UNIXTIME(created, '$cond1') = '$cond2' AND creator_id='$cond3'";

$res = $this->db->query($query);
return $res;
}
and i get this error

Not unique table/alias: 'projects'


Messages In This Thread
permission issue - by El Forum - 09-25-2010, 01:16 AM
permission issue - by El Forum - 09-25-2010, 02:11 AM
permission issue - by El Forum - 09-25-2010, 03:40 AM
permission issue - by El Forum - 09-25-2010, 08:33 AM
permission issue - by El Forum - 09-25-2010, 09:04 AM
permission issue - by El Forum - 09-25-2010, 07:11 PM
permission issue - by El Forum - 09-26-2010, 06:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB