Re: SQL ODBC to Access97
| From: | Derek Paterson | Date: | Fri, 01 Sep 2000 14:35:43 +0000 |
| Subject: | Re: SQL ODBC to Access97 | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-2563@lists.php.net to get a copy of this message | ||
Sorry, my stupidity yet again, the log file told me the problem - if using
an aggregate function, all the selected fields must be aggregated (usually
MAX).
I now have an enormous SQL statement but it works ;-)
Derek
----- Original Message -----
From: "Derek Paterson" <derek.paterson@edinburgh.gov.uk>
To: <php-db@lists.php.net>
Sent: 01 September 2000 12:50
Subject: [PHP-DB] SQL ODBC to Access97
> Everything seems to work fine on most SQL Selects but for some reason this
> one hangs (no error on either client or server).
>
> $sql = "SELECT Untitled.* FROM Untitled GROUP BY Untitled.WGCode ORDER BY
> Untitled.$SortOrder DESC";
>
> It works without the GROUP BY but when it is added, the connection starts,
> but the client reports finished although the query hasn't been prepared
(no
> error reported). It appears to be the same with all aggregate functions
> such as SUM & COUNT.
>
> Is it my ODBC driver (NTW4 SP5) components version 3.520.4403.2?
>
> Any ideas?
>
> Derek
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>