I bet I'm missing something obvious on this one, but I'm stumped.
I have the daily mail going out on Monday Wed and Friday, so I changed the
sub getDailyMail a bit to pull out stories 2 days back. So my query looks
like this
select stories.sid, stories.title, stories.section,
users.nickname,
stories.tid, stories.time, stories.dept,
story_text.introtext, story_text.bodytext
FROM stories, story_text, users
WHERE TO_DAYS(time) >= TO_DAYS(NOW() - INTERVAL 2 DAY)
AND TO_DAYS(time) <= TO_DAYS(NOW())
AND users.uid=stories.uid AND stories.sid=story_text.sid
AND stories.displaystatus=0
ORDER BY stories.time
SO my problem is when I run this from the command line, all is well. When
slashcode runs the task, it pulls out ALL the stories, it doesn't pay any
attention to the date for some reason.
Do the tasks get date stuff from somewhere I'm not seeing?
Thanks!
-----
Blake Carver
LISNews.com
Librarian & Information Science News
http://lisnews.com
|