PHP & Sybase ASA 7.0 Queriues
| From: | Johan Fredrik �hman | Date: | Mon, 09 Oct 2000 22:24:17 +0000 |
| Subject: | PHP & Sybase ASA 7.0 Queriues | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-3441@lists.php.net to get a copy of this message | ||
I'm using the following system:
Sybase ASA 7.0 Evaluation (linux)
RedHat 7.0
PHP 4.02
I compiled with: php-4.0.2]$
./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 ?
Thanks for you help.
--
Johan Fredrik Ohman