mssql returned array
| From: | Rainer Zufall | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | mssql returned array | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-187@lists.php.net to get a copy of this message | ||
Please HELP !!!
I am working with php4, apache and linux.
I use sybase-11.9.2 to connect to an WNT mssql server.
Sometimes (<10% of the time ) my get_cid functions returns wrong values.
function get_cid($cid)
{
# $fields="FIRSTNAME,..."
$r=mssql_query("select $fields from masteraccounts where
CUSTOMERID=$cid");
$ma=mssql_fetch_array($r);
mssql_free_result($r);
# do some more querys
$res=array("a"=>"b");
$res["TEST"]=$ma["TEST"];
echo $res["TEST"]; # everything is great !!
return $res;
};
# open db
$u=get_cid(35800);
echo $res["TEST"];
# prints 'a' , what went wrong ?????
# close db
I tried this code with RC1 and the final version
I don't know how to eliminate the problem, please help
Markus