2 tables in one action

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
pleigh
Forum Contributor
Posts: 445
Joined: Wed Jan 19, 2005 4:26 am

2 tables in one action

Post by pleigh »

is it possible for me to record in two tables in one clicking?for example, i would like to record from php a message in the comments table, but would like to record the date of recording it to another table....is it possible??
Jim_Bo
Forum Contributor
Posts: 390
Joined: Sat Oct 02, 2004 3:04 pm

Post by Jim_Bo »

Hi,

Just insert

$sql = mysql_query ...

for each table .. maybe .. ?
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

ya! definitely! only this to do is to fire the correct SQL for both things.
User avatar
pleigh
Forum Contributor
Posts: 445
Joined: Wed Jan 19, 2005 4:26 am

Post by pleigh »

yup, thanks guys, got it right awhile ago... :wink:
Post Reply