Hi all!

I've stepped into an annoying problem when trying to fetch the tuples returned by a stored procedure in a MSSQL database from a PHP program running in a Centos Linux server running PHP 4.4.4.

The stored procedure returns an arbitrary number of tuples, and my code is only working when the SP returns one row.

The code I'm using, simplified, follows:

  $db_conn = mssql_connect ("server", "user", "passwd");
  mssql_select_db("db",$db_conn);

  $query = "Exec stored_procedure '$par1', '$par2'";
  $result = mssql_query ($query);

  while ($row = mssql_fetch_array ($result)) {
      echo $row["COL1"];
      echo "<br/>";
  }

If stored_procedure () returns only one row, the code executes without any problem. However, if there are more than one rows to be returned, the program not only blocks, but also eats all the server's memory.

I've run this program also in Ubuntu with PHP 4.4, and it works without any problem, so I'm thinking it may be either a configuration problem of the centos server, or a bug in the PHP version.

Do you have any hint to solve this? I would appreciate any advice.

Thanks in advance,

Claudio

--
Claudio Saavedra <[EMAIL PROTECTED]>
---------------------------------------------------------------------
La informacion contenida en esta transmision (y sus documentos adjuntos), es confidencial y no puede ser usada o difundida por personas distintas a su(s) destinatario(s). El uso no autorizado de la informacion contenida en esta transmision puede ser sancionado criminalmente de conformidad con la ley chilena. Si ha recibido esta transmision por error, por favor destruyala y notifique al remitente. Atendido que no existe certidumbre que el presente mensaje no sera modificado como resultado de su transmision por correo electronico, nuestra empresa, no sera responsable si el contenido del mismo ha sido modificado".

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

Reply via email to