PHP 4.0 Bug #7105 Updated: sybase queries fails with quotes

From: Date: Tue, 10 Oct 2000 06:38:57 +0000
Subject: PHP 4.0 Bug #7105 Updated: sybase queries fails with quotes
Groups: php.dev 
Request: Send a blank email to php-dev+get-34546@lists.php.net to get a copy of this message
ID: 7105 Updated by: joey Reported By: johanfo@essay.org Status: Closed Bug Type: Sybase-ct (ctlib) related Assigned To: Comments: This is not a PHP bug, but an error in your understanding of SQL. select "fname" from anytable Will return "fname" as many times as there are rows in the table. Try, instead 'select fname from anytable' or "select fname from anytable" And buy an SQL book. Previous Comments: --------------------------------------------------------------------------- [2000-10-09 19:17:05] johanfo@essay.org ./configure --with-apxs --with-sybase-ct=/opt/sybase-11.9.2/ --with-gd The ct library was fetched from http://linux.sybase.com/ase/1192download.html Yet, this is a ASE Open Client, it compied just fine. The below query works fine, no problem ----------------------------- $sql = 'SELECT fname FROM customer'; echo "Debug: " . $sql ."n"; $qry = sybase_query($sql, $db); while($row = sybase_fetch_array($qry)){ while (list ($key, $val) = each ($row)) { echo "$key => $val<br>"; } ----------------------------- BUT, when I try to quote the column, like: ----------------------------- $sql = 'SELECT "fname" FROM customer'; echo "Debug: " . $sql ."n"; $qry = sybase_query($sql, $db); while($row = sybase_fetch_array($qry)){ while (list ($key, $val) = each ($row)) { echo "$key => $val<br>"; } ----------------------------- .. things get messy, then every row in the result set has 'fname' as value ! As a mather of fact, not even "DBA"."fname" which is a common syntax, is allowed. Is this because of the ASE OpenClient ? Anybody else being able to quote fielnames in queries when using ASA 7..0 ? I also tested the php connection agains an Windows ASA7 clean install, and asademo as db, but the php queries fails on quotes even there. php.ini is not modified. --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=7105

« previous php.dev (#34546) next »