Hi every one,
I am using this funtion
function get_last_inserted_id($table) {
include "dbsetting/adm_vars_config.php";
include "dbsetting/classdbconection.php";
$dbacosis = new dbacosis();
$sqlacosis = $dbacosis->queryacosis("SELECT LAST_INSERT_ID() AS `last_id` FROM `pcosis_courses`;");
if(!$sqlacosis or mysql_num_rows($sqlacosis) == 0) {
return false;
} else {
$data = mysql_fetch_array($sqlacosis);
return $data['last_id'];
}
}
$id = get_last_inserted_id("courses");
echo $id;
but it reture zero. anybody have idea.