hi!
system:
lang: php5.2.*
server: mssql express *.1399 (2005)
conn.driver: php_sqlsrv.dll (version 1.0)
i have a small table "Table01" at express server with fields:
id (int)
name (ntext)
company (bytes) - link to "Table02"
$query = sqlsrv_query($c onn, 'SELECT * FROM Table01');
$massarray=sql_ fetch_all($quer y);
echo $massarray[$i]['company']."<br>";//bytes
sqlsrv_close($c onn);
//=============== =============== ===============
function sql_fetch_all($ query){
$i=0;
$massarray=arra y();
while( $row = sqlsrv_fetch_ar ray($query, SQLSRV_FETCH_AS SOC)){
$massarray[$i]=$row;
$i=$i+1;
}
return $massarray;
}
The view of $massarray[$i]['company'] is not correct..
system:
lang: php5.2.*
server: mssql express *.1399 (2005)
conn.driver: php_sqlsrv.dll (version 1.0)
i have a small table "Table01" at express server with fields:
id (int)
name (ntext)
company (bytes) - link to "Table02"
$query = sqlsrv_query($c onn, 'SELECT * FROM Table01');
$massarray=sql_ fetch_all($quer y);
echo $massarray[$i]['company']."<br>";//bytes
sqlsrv_close($c onn);
//=============== =============== ===============
function sql_fetch_all($ query){
$i=0;
$massarray=arra y();
while( $row = sqlsrv_fetch_ar ray($query, SQLSRV_FETCH_AS SOC)){
$massarray[$i]=$row;
$i=$i+1;
}
return $massarray;
}
The view of $massarray[$i]['company'] is not correct..
Comment