PHP 4.0 Bug #7105: sybase queries fails with quotes

From: Date: Mon, 09 Oct 2000 23:17:05 +0000
Subject: PHP 4.0 Bug #7105: sybase queries fails with quotes
Groups: php.dev 
Request: Send a blank email to php-dev+get-34533@lists.php.net to get a copy of this message
From: johanfo@essay.org Operating system: Linux PHP version: 4.0.2 PHP Bug Type: Sybase-ct (ctlib) related Bug description: sybase queries fails with quotes ./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. -- Edit Bug report at: http://bugs.php.net/?id=7105&edit=1

« previous php.dev (#34533) next »