MS SQL Query question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When I run a query the syntax looks like this:

$result = mssql_query($query);
$numRows = mssql_num_rows($result);

for($i=0; $i<$numRows; $i++)
{
$row = mssql_fetch_array($result);
}

but if I go to try and loop through the resultset again it wont work
unless I run this line again "$result = mssql_query($query);"

I'm sure this is wasting resources but I can't seem to get around it.  Any
suggestions?

Thanks,
Ron






[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux