Wallpapers Forums Login

Mysql Insert Into Multiple Tables With One Query

today i wanted to insert some data into two different tables using mysql and php script.

for example, this is my query:

$Query = "INSERT INTO a.user b.counter SET userid=2,UserName='Walter',counter=23,views=56";

userid will go into the user and counter database table

UserName will go into user table

counter and views will go into counter table

how can i do this without having to use two queries like this:

$Query = "INSERT INTO user SET userid=2,UserName='Walter'";
$Query = "INSERT INTO counter SET counter=23,views=56";

thanks

Related Content

Information

Share

wallpaperama | Wallpapers | Forums | Terms Of Service

copyright © 2013 wallpaperama - All Rights Reserved - Last Updated Mon May 06, 2013 (-8 GMT)
Powered by: Webune Forums V5