From: leonard at den dot ottolander dot nl
Operating system: Linux (RH 9 and FC 1)
PHP version: 4.3.4
PHP Bug Type: DBX related
Bug description: dbx does not know about COUNT
Description:
------------
dbx gives a syntax error when using COUNT:
SELECT COUNT (`ID`) FROM `category` WHERE `packageID` = 593
You have an error in your SQL syntax near '(`ID`) FROM `category` WHERE
`packageID` = 593' at line 1
First seen on Red Hat Linux 9, php-4.2.2, but reproduced on Fedora Core 1,
php-4.3.4.
Reproduce code:
---------------
$q = ...COUNT...;
echo $q;
$res = dbx_query($link, $q);
if ($res == 0) {
echo dbx_error($link);
}
--
Edit bug report at http://bugs.php.net/?id=27497&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27497&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27497&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=27497&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=27497&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27497&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=27497&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=27497&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=27497&r=support
Expected behavior: http://bugs.php.net/fix.php?id=27497&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=27497&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=27497&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=27497&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27497&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=27497&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=27497&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=27497&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27497&r=float