RE: Help with ODBC to Access query
| From: | Fernando Madruga | Date: | Tue, 06 Mar 2001 09:47:54 +0000 |
| Subject: | RE: Help with ODBC to Access query | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-5846@lists.php.net to get a copy of this message | ||
I don't know about MySQL, but some other SQL databases I've used MUST have
all fields specified in the WHERE clause returned in the SELECT! That is,
you should probably add ', CallDate' to the SELECT part so as to return it.
Just a thought.
Madruga
> I'm trying to get the following query to work:
>
> $query1 = 'SELECT COUNT(RunNumber) AS RunCount,
> DatePart("m", CallDate) AS MonNum
> FROM CallData
> WHERE (CallDate Between #1/1/00# AND #12/31/00#)
> AND Driver = 1731
> GROUP BY DatePart("m", CallDate)';
>
> It returns the following error:
>
> Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few
> parameters. Expected 1., SQL state 07001 in SQLExecDirect in
> d:\internet\apache\htdocs\db\test.php on line 48