View Full Version : id problem

02-01-2012, 04:36 PM
userid | username

adid | userid | ad

after i insert record into table_user i will insert userid coming from table_user into table_ad .

but how ?

02-01-2012, 07:15 PM
What is userid? If its an auto increment you can fetch the last insert using either SQL's LAST_INSERT_ID() or using PHP's mysql_insert_id (assuming MySQL, most others have a similar). That can then be used to insert where necessary.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum