#27497 [Bgs]: dbx does not know about COUNT

From: Date: Thu, 04 Mar 2004 20:08:56 +0000
Subject: #27497 [Bgs]: dbx does not know about COUNT
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-55926@lists.php.net to get a copy of this message
 ID:               27497
 User updated by:  leonard at den dot ottolander dot nl
 Reported By:      leonard at den dot ottolander dot nl
 Status:           Bogus
 Bug Type:         DBX related
 Operating System: Linux (RH 9 and FC 1)
 PHP Version:      4.3.4
 New Comment:

? I use mysql as a backend. Running the same query in phpMyAdmin works
just fine.


Previous Comments:
------------------------------------------------------------------------

[2004-03-04 13:45:32] derick@php.net

This doesn't have anything to do with DBX, but with the database
backend that you use for it. That one simply doesn't support "COUNT".
Not a bug in PHP -> bogus.

------------------------------------------------------------------------

[2004-03-04 13:32:44] leonard at den dot ottolander dot nl

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 this bug report at http://bugs.php.net/?id=27497&edit=1


Thread (6 messages)

« previous php.bugs (#55926) next »