sybase testing.. problems with resultset?
| From: | Harold | Date: | Tue, 30 Nov 1999 10:57:08 +0000 |
| Subject: | sybase testing.. problems with resultset? | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-7089@lists.php.net to get a copy of this message | ||
ive been reporting sybase problems for the past couple of days now.. some of
the problems we sorted out with our functions.. some of the problems are
still there..
can the people who use sybase and php test out the following script.. it
gives us a segfault..
<?
error_log("<<<< start testing phase >>>>",0);
sybase_connect("db", "sa", "");
sybase_select_db("db");
echo '<br><br>';
// this doesn't work, '.. exit signal Segmentation fault(11)
$queryString = 'select * from sysobjects';
// this work's
//$queryString = 'select name from sysobjects';
if(!($queryResult = sybase_query($queryString)))
{
echo 'No Data found';
return;
}
echo "queryResult: " . $queryResult;
echo "rows: " . sybase_num_rows($queryResult);
echo "<br><br>";
// fuer jede Zeile aus Result ...
while ($row = sybase_fetch_array($queryResult))
{
echo "name: " . $row["name"]. '<br>';
}
error_log("<<<< end testing phase >>>>",0);
?>
if you want to try a short version try..
<?
sybase_connect("db", "sa", "");
sybase_select_db("db");
$query = sybase_query("select * from sysobjects");
while ($row = sybase_fetch_array($query)) {
echo "$row[name] <br>";
}
?>
the sysobjects table is a standard system table for sybase.. it would be
interesting to see if others have, or dont have, the same problem..
there is also a difference when you use
echo "$row[name] <br>";
or
echo $row[name] . "<br>"; - must be -> echo $row["name"] .
"<br>";
we have php4.0b4-dev build date: Nov 28 1999 / redhat6.1 / apache 1.3.9 /
sybase ase 11.9.2
our configure for php
./configure --enable-track-vars --enable-trans-sid --with-apache=../apache_1
.3.9 --with-sybase=/opt/sybase-11.9.2 --disable-debug
with enabled/disabled debug we cant get debugger_on() working.. so we use
error_log statements to see where abouts the segfault is.. i hope to think
this gives accurate reporting..