Can I have a single SQL string do INSERTS into multiple tables?

Like:

sql="INSERT INTO tbl_1 (id,
        email_address_1)
VALUES ($v_personid,
        '$v_email');
INSERT INTO tbl_2 (person_id,
        interest_id)
VALUES ($v_personid,
        $v_int1);";

Or do I need to break them up and use two of these?

$result = $db->query($sql)

Thanks
Charles


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to