RE: [PHP-DB] Re: Looking for more optimal way to do multiple similar inserts at
| From: | -{ Rene Brehmer }- | Date: | Thu, 11 Nov 2004 19:45:57 +0000 |
| Subject: | RE: [PHP-DB] Re: Looking for more optimal way to do multiple similar inserts at | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-37240@lists.php.net to get a copy of this message | ||
yeah, I noticed that ... haven't had a chance to check for certain, but I believe the server I have to work with is 3.23 ... and since my space is rented, I don't have alot of say in upgrading ... although it might be possible to get them to do it ... their PHPMyAdmin is really old too ... :-s
Rene
At 16:17 11-11-2004, Norland, Martin wrote:
Please note that his solution uses a subselect - and your version of mysql may not support subselects. Subselects were introduced (I believe) in Mysql 4.1 - Martin Norland, Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital. -----Original Message----- From: Sebastian Mendel [mailto:lists@sebastianmendel.de] Sent: Thursday, November 11, 2004 6:42 AM To: php-db@lists.php.net Subject: [PHP-DB] Re: Looking for more optimal way to do multiple similar inserts at // send Messages $sql = ' INSERT INTOhf_privmessages(ownerID,fromID,toID,from_name,to_name,priority,date,`subj ect,message,folder`)SELECTWHEREuserIDASownerID, ' . (int) $userID . ' ASfromID,userIDAStoID, "' . $username . '" ASfrom_name,nicknameASto_name, "' . $_POST['priority'] . '" ASpriority, NOW() ASdate, "' . $subject . '" ASsubject, "' . $message . '" ASmessage, "inbox" ASfolderuserIDIN (' . implode( ', ', $_POST['rcvID'] ) . ') ';