[eluser]tim1965[/eluser]
Sorry in advance, i know i am missing something easy here, but have been struggling all day with this. Long break off over Xmas and newbie, so i will blame it on that.
Problem: i want to get the insert_id value and use this to populate a select statement.
When i echo this i get the correct result. When i try to populate a select i get a unexpected T_VARIABLE on the insert_id line.
thanks in advance
Secondly is my select statement correctly syntax'd ?
// Create user
if ($this->ci->users->create_user($row))
{
$latest_id = $this->ci->db->insert_id();
$query = $this->ci->db->query('SELECT `username` FROM `users` WHERE `id`='$latest_id'');
echo 'test' .$query;
// Trigger event
$this->ci->dx_auth_event->user_activated($this->ci->db->insert_id());
// Delete user from temp
$this->ci->user_temp->delete_user($del);
$result = TRUE;
}