you have the idea.
Just add the other sql statements and run it again. (Just multiply the
script by 3) or you can use a loop to add the next sql to run eg.
$sql1= "insert statement 1";
$sql2="insert statement 2";
$sql3= "insert statement 3";
for ($i=0; $i<3; $i++)
{
$qryno = '$sql' + $i
$res
"Julian Wood" <[EMAIL PROTECTED]> wrote:
> > That's it. There's nothing special to do.
>
> Except if one insert fails and the others succeed, you run into a bit of
> sync trouble. This is what transactions are for. You might want to
consider
> a BDB table type, which supports transactions, then y
> That's it. There's nothing special to do.
Except if one insert fails and the others succeed, you run into a bit of
sync trouble. This is what transactions are for. You might want to consider
a BDB table type, which supports transactions, then you have the option to
rollback the other inserts
> Add two more sets of statements like those you have for the
> first query. That's it. There's nothing special to do.
MySQL also lets you stack insert statements:
$sql="INSERT INTO t1 ('A'); INSERT INTO t2 ('B'); INSERT INTO t3 ('C');"
This would work (but if you get an error, you'll have tr
"Fates" <[EMAIL PROTECTED]> wrote:
> I know how to add data to one table but how do I add data to three
> tables from one form?
>
> I want to do this with just one form and on one web page so it doesn't
> post to another page.
>
> How do I set up the insert statement?
>
>$query = "INSERT INTO
5 matches
Mail list logo