Welcome Guest, Not a member yet? Register   Sign In
Unknown column 'xxx' in 'on clause'
#10

[eluser]ibnclaudius[/eluser]
This worked:

Code:
->join($this->sessions_table, $this->sessions_table . '.user_id = ' . $this->users_table . '.id AND ' . $this->sessions_table . '.token = ' . "'" . $token. "'")

But I have another query, with single quotes, that works, why? Look:

Code:
$query = $this->db->select($this->schools_table . '.id AS id, ' . $this->schools_table . '.name AS name')
    ->from($this->schools_table)
    ->join($this->users_schools_table, $this->users_schools_table . '.school_id = ' . $this->schools_table . '.id AND ' . $this->users_schools_table . '.user_id = ' . $user_id, 'INNER')
    ->order_by($this->users_schools_table . '.created', 'DESC')
    ->limit(1)
    ->get();


Messages In This Thread
Unknown column 'xxx' in 'on clause' - by El Forum - 02-05-2012, 12:06 PM
Unknown column 'xxx' in 'on clause' - by El Forum - 02-05-2012, 12:14 PM
Unknown column 'xxx' in 'on clause' - by El Forum - 02-05-2012, 12:17 PM
Unknown column 'xxx' in 'on clause' - by El Forum - 02-05-2012, 12:20 PM
Unknown column 'xxx' in 'on clause' - by El Forum - 02-05-2012, 12:24 PM
Unknown column 'xxx' in 'on clause' - by El Forum - 02-05-2012, 12:28 PM
Unknown column 'xxx' in 'on clause' - by El Forum - 02-05-2012, 12:32 PM
Unknown column 'xxx' in 'on clause' - by El Forum - 02-05-2012, 12:33 PM
Unknown column 'xxx' in 'on clause' - by El Forum - 02-05-2012, 12:34 PM
Unknown column 'xxx' in 'on clause' - by El Forum - 02-05-2012, 12:44 PM
Unknown column 'xxx' in 'on clause' - by El Forum - 02-05-2012, 12:52 PM
Unknown column 'xxx' in 'on clause' - by El Forum - 02-06-2012, 02:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB