mssql_fetch_row problem and php/freetds0.50/apache-1.3.11

Mike Smith mike at ftl.com
Sun Feb 27 20:20:44 EST 2000


 Hi all,

 I'm running apache 1.3.11 and freetds-0.50. I keep getting a segfault
on apache with this request.

  while  ($myrow=mssql_fetch_row($result))  {

 I do a mssql_fetch_field just above this and that returns fine. Anyone 
got
any ideas on this???

 Also, another thing I see...In this code...

MSSQL_CONNECT($hostname,$username,$password) or DIE("DATABASE FAILED TO 
RESPOND.");
mssql_select_db($dbName) or DIE("Table unavailable");
$query = "SELECT * FROM tng_managedobject";
$result = MSSQL_QUERY($query);
$number = MSSQL_NUM_ROWS($result);
$i=0; if ($number == 0) : print "No data?";
elseif ($number > 0) : print "Data:<br>";
while ($i < $number) : $name = mssql_result($result,$i,"Name");
print $name; print "<br>";
$i++;
endwhile;
endif;

 It seems to only return one column. However if I do the same query on the 
server it self I get all columns back.

 Thanx in advance.

 - Mike



More information about the FreeTDS mailing list