Newbie MySQL INSERT Q

From: Date: Fri, 14 Mar 2003 15:03:38 +0000
Subject: Newbie MySQL INSERT Q
Groups: php.general 
Request: Send a blank email to php-general+get-139716@lists.php.net to get a copy of this message
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

« previous php.general (#139716) next »