At 7:18 +0000 1/19/03, Nasser Ossareh wrote:
>a row gets inserted into this table
whenever a visitor uses a certain tool on the site
based on this approach your table does not have any entries for the
days that no one uses the certain tool on the site. As a result
your query can not pull out records which don't exist.
You could catter for this programmatically by a perl script. The
script could do this:
That would work, but it's not necessary. He should use a LEFT JOIN,
which will produce a row in the output for the left table, whether
or not any right table rows match it. The syntax is in the MySQL manual.
create a temporary table
insert all records from your main table between TheStartDate and TheEndDate...
iterate through TheStartDate and theEndDate and add one record per
day to the temporary table.
The SQL statement should display count-1 for each day.
I don't have perl on my system so I can't help with the script I
hope someone else can.
-Nasser.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php