problem with mssql_query
| From: | bob pillford | Date: | Tue, 11 Nov 2003 15:07:30 +0000 |
| Subject: | problem with mssql_query | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-169172@lists.php.net to get a copy of this message | ||
Hi all i have the following code which isnt working correctly and i cant work out why. Any help
would be greatly appreciated as its sending me crazy!
$query = "select refno from campaign where appdate between 'nov 07 2003' and
'nov 08 2003' ";
$result=mssql_query($query,$numero);
$numrows=mssql_num_rows($result);
$row=mssql_fetch_row($result);
echo $numrows;
print_r($row);
Now this returns: 23
Array ( [0] => 1044998 )
which is 23 for number of rows the query returns but it only ever stores the 1st element of the
returned array in $row.. Can someone tell me where i am going wrong as i need access to the other 22
rows that this query returns.... I have echoed the query and run the out put under freetds tsql and
get the correct result (this is what i use to access the ms sql server 2000).
Any help would be greatly appreciated.!
Cheers
Bob