inserting data into two tables?

dinges

New Member
im using mysql, these are two tables i have:\[code\]posts {id, user_id, post, date}post_tags {id, tag, post_id(references id in post), user_id}\[/code\]what im trying to do is if the post has a #tag , i insert the intial post in the \[code\]POSTS\[/code\] table, and the data in the \[code\]post_tags\[/code\] table, how could i do that simlateanously?P.S. i already know how to check if a post has a tag!! i just want to undertand, how can insert data into both!! espcially the ID's because they are generated within mysql(autoincrement)!!
 
Back
Top