I need to fetch row of last inserted id.If the last row value of id is 1234.Then I have to use that value in where clause.I am trying following code.but not working
$stmt8->prepare( "SELECT stat_id FROM " ."raw_nw_static_db_icube"."WHERE id=LAST_INSERT_ID ");
$stmt8->execute();
$stmt8->bind_result($stat_id);
$stmt8->fetch();
echo $stat_id;
Do anyone have idea to do this ?