Puzzled by MSSQL

From: Date: Mon, 16 Oct 2000 18:54:39 +0000
Subject: Puzzled by MSSQL
Groups: php.db 
Request: Send a blank email to php-db+get-3644@lists.php.net to get a copy of this message
Hi folks, I'm having this weird problem connecting to a MS SQL Server 7.0 database, from 4.02 on Linux... Here's a snippet of code: $resultado = mssql_query($sql); $numero_pages = mssql_num_rows($resultado); $this_row=array(); if ($numero_pages > 0) { for ($i; $i <= $numero_pages; $i++) { $this_row = mssql_fetch_array($resultado); $pagina_id = $this_row["PageID"]; $pagina[$pagina_id] = $this_row["Name"]; print $i . " " . $pagina_id . " " . $pagina[$pagina_id]; } } else { print "No results!"; } The table I'm pulling this stuff from has only 2 rows (I verified the SELECT statement on Microsoft's SQL Console thing), but I'm only able to pull the 1st row. When the script tries to fetch the 2nd row, I get this error: Warning: 2 is not a valid Sybase result resource in db1.php on line 27 I'm sure I'm doing something wrong, but I simply can't see it... Appreciate your help... -- alexandre siufy lead developer tiaxa.com / www.tiaxa.com (305) 665 1055

« previous php.db (#3644) next »