Jump to content

Whats Wrong With This Sql ?


madsovenielsen

Recommended Posts

What kind of an error does it give? Is "entry" of type DATETIME (I'm guessing "yes", but am asking anyways)? Is "amount" another column in the "stat80" table?For that last two ones, if yes, then I think the query should be:

SELECT COUNT(DISTINCT remote_addr), amount FROM stat80 WHERE entry < '01-01-2010 00:00'

(note the apostrophes around the date and the comma that separates the two result set columns)

Link to comment
Share on other sites

What kind of an error does it give? Is "entry" of type DATETIME (I'm guessing "yes", but am asking anyways)? Is "amount" another column in the "stat80" table?For that last two ones, if yes, then I think the query should be:
SELECT COUNT(DISTINCT remote_addr), amount FROM stat80 WHERE entry < '01-01-2010 00:00'

(note the apostrophes around the date and the comma that separates the two result set columns)

Yes and yesit works now, thanks
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...