ID: 13008 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: No Feedback Bug Type: MSSQL related Operating System: Linux 2.2.12-20 Red Hat 6.1 PHP Version: 4.0.6 New Comment:
Im am using Windows NT and PHP 4.2.3 and experience the same problems with MS SQL Server 2000: i try to do multiple inserts in one query: <script> $sql = " INSERT INTO tbl (col1, col2) VALUES( $int1, '$str1'); INSERT INTO tbl (col1, col2) VALUES( $int2, '$str2'); ..." mssql_query($sql); </script> the thing is: one query with more than one insert works, the data is is in the DB. But all others fail. It also works if I do only one insert at the time. Even it works, if I put all inserts in one string and do 10000 inserts with one query. I see a problem here, because the amount of data can grow very large. so there are probably some restrictions to the contents of a string-Variable and the String-Length of a query. I dont understand, why it is not possible to do a second query after inserting more then one lines... chris Previous Comments: ------------------------------------------------------------------------ [2002-10-25 01:00:06] [EMAIL PROTECTED] No feedback was provided for this bug for over 2 weeks, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2002-10-09 11:59:14] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip If the problem still occures try upgrading to freetds-0.53 and seeing if that'll solve the problem. ------------------------------------------------------------------------ [2002-08-26 15:38:39] [EMAIL PROTECTED] I will check within the next week or two to verify. ------------------------------------------------------------------------ [2002-08-17 02:12:05] [EMAIL PROTECTED] Is this still a valid bug in the recent PHP releases? ------------------------------------------------------------------------ [2001-08-28 16:01:08] [EMAIL PROTECTED] I'm using FreeTDS 0.51 to access an MSSQL 7.0 pl1 database server. I can use PHP to SELECT information from the database with no problems. I'm having problems with multiple insert/updates done to the database in sequence. My algorithm attempts to insert/update several rows of data into the database after an HTTP put. It will first attempt to do an SQL insert, and if that errors due to duplicate key restraints it will do an SQL update. I'm finding that it will do the first update, but after that nothing appears to work unless I close the connection to the database and reopen it again. While this works in a small installation, I can see problems with hundreds of database updates per minute constantly opening and closing connections for each row updated. I can do multiple SQL inserts in sequence with no problems. It is when the key restraint warning occurs and I do an update. I have the code if interested. Here is my PHP configure line: ./configure --with-mysql --with apxs=/usr/local/apache/bin/apxs --with-gd --with-mssql=/usr/local/freetds --with-sybase=/usr/local/freetds --enable-track-vars Thanks ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=13008&edit=1