get auto_increment id
Posted: Fri May 06, 2005 9:57 am
there is a auto incrementing id in this table. the id is called working_expierence_id. heres my query
inside that query i need to retreive the id that it makes when inserting those values and whatnot. how do i do that? i can not have a seperate query to get the id.
Code: Select all
$query = '
INSERT INTO
mdl_cv_working_experience
(company_name, beginning_date, end_date,
fk_working_experiences_id,
fk_dd_job_category_id, fk_dd_occupation_id,
fk_dd_position_id, fk_dd_industry_id,
fk_dd_company_type, fk_dd_company_size)
VALUES
("'.$_POST[edit][company_name].'", "'.begin_date.'",
"'.end_date.'", "'.$work_exps_id[0].'", "'.$_POST[job_category].'",
"'.$_POST[occupation].'",
"'.$_POST[position].'", "'.$_POST[industry].'",
"'.$_POST[company_type].'", "'.$_POST[company_size].'")
';