Is there any function I can use to get the last inserted value in my column thread_id
?
$result = DB::insert("Insert Into $this->table (thread_id, sender_id, subject, message, date_sent)
Select COALESCE(max(thread_id),0)+1 , ? , concat('Re: ',subject), ? , now() FROM $this->table Limit 1",array( $sender_id , $message) );
something like insertGetId