Re: Fun with Dates and Incentives.

2006-05-26 Thread sheeri kritzer
riginal Message- From: sheeri kritzer [mailto:[EMAIL PROTECTED] Sent: Thursday, May 25, 2006 9:13 AM To: Brian Menke Cc: [EMAIL PROTECTED]; mysql@lists.mysql.com Subject: Re: Fun with Dates and Incentives. Brian, MySQL's timestamp function is based on the *server*'s timestamp,

Re: Fun with Dates and Incentives.

2006-05-26 Thread Jeff Shapiro
On Wednesday 24 May 2006 15:18, Brian Menke scribble on about: > Peter, thanks for the detailed info. I will figure out how to get rid of > the UNIQUE key. Somehow that got added. Thanks for the catch. As far as INT > for student id goes, I'm using email because it will be unique, and offers > an e

Re: Fun with Dates and Incentives.

2006-05-26 Thread Jeff Shapiro
On Wednesday 24 May 2006 15:18, Brian Menke scribble on about: > Peter, thanks for the detailed info. I will figure out how to get rid of > the UNIQUE key. Somehow that got added. Thanks for the catch. As far as INT > for student id goes, I'm using email because it will be unique, and offers > an e

Re: Fun with Dates and Incentives.

2006-05-25 Thread Peter Brawley
kritzer [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 25, 2006 9:13 AM To: Brian Menke Cc: [EMAIL PROTECTED]; mysql@lists.mysql.com Subject: Re: Fun with Dates and Incentives. Brian, MySQL's timestamp function is based on the *server*'s timestamp, not the client's. -Sheeri On 5/24/0

RE: Fun with Dates and Incentives.

2006-05-25 Thread Brian Menke
ROTECTED] Sent: Thursday, May 25, 2006 9:13 AM To: Brian Menke Cc: [EMAIL PROTECTED]; mysql@lists.mysql.com Subject: Re: Fun with Dates and Incentives. Brian, MySQL's timestamp function is based on the *server*'s timestamp, not the client's. -Sheeri On 5/24/06, Brian Menke <

Re: Fun with Dates and Incentives.

2006-05-25 Thread sheeri kritzer
S! -Brian _ From: Peter Brawley [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 24, 2006 3:56 PM To: Brian Menke Cc: mysql@lists.mysql.com Subject: Re: Fun with Dates and Incentives. Brian, CURRENT_TIMESTAMP gives you time in your server's timezone. UTC_TIMESTAMP gives GM (univer

RE: Fun with Dates and Incentives.

2006-05-24 Thread Brian Menke
_ From: Peter Brawley [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 24, 2006 1:31 PM To: Brian Menke Cc: mysql@lists.mysql.com Subject: Re: Fun with Dates and Incentives. Brian Re your schema, --it's redundant to define PRIMARY and UNIQUE keys on the same column, -

Re: Fun with Dates and Incentives.

2006-05-24 Thread Peter Brawley
awley [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 24, 2006 1:31 PM To: Brian Menke Cc: mysql@lists.mysql.com Subject: Re: Fun with Dates and Incentives.   Brian Re your schema,   --it's redundant to define PRIMARY and UNIQUE keys on the same column,   --why not an INT

Re: Fun with Dates and Incentives.

2006-05-24 Thread Peter Brawley
Brian, Somehow the server ate my response... Re your schema, --it's redundant to define PRIMARY and UNIQUE keys on the same column, --why not an INT student id? --what if two (eg married) students share an email account? --comparing datetimes across multiple time zones will be simpler if you

RE: Fun with Dates and Incentives.

2006-05-24 Thread Brian Menke
ian _ From: Peter Brawley [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 24, 2006 1:31 PM To: Brian Menke Cc: mysql@lists.mysql.com Subject: Re: Fun with Dates and Incentives. Brian Re your schema, --it's redundant to define PRIMARY and UNIQUE keys on the same column, --why not

Re: Fun with Dates and Incentives.

2006-05-24 Thread Peter Brawley
Brian Re your schema,   --it's redundant to define PRIMARY and UNIQUE keys on the same column,   --why not an INT student id?   --what if two (eg married) students share an email account?   --comparing datetimes across multiple time zones will be simpler if you       set completed_modules.tim

Re: Fun with Dates and Incentives.

2006-05-24 Thread Jason Dimberg
I think doing a sort by date with limit 10 should get you the first ten. I believe the now() function uses the server time, so no need to do date/time calcs really. Good luck, Jason Brian Menke wrote: I'm hoping for some general advice on an approach for the following scenario: I have a

RE: Fun with Dates and Incentives.

2006-05-24 Thread George Law
TECTED] > Sent: Wednesday, May 24, 2006 12:51 PM > To: mysql@lists.mysql.com > Subject: Fun with Dates and Incentives. > > I'm hoping for some general advice on an approach for the following > scenario: > > > > I have a customer who wants to put an incenti

Fun with Dates and Incentives.

2006-05-24 Thread Brian Menke
I'm hoping for some general advice on an approach for the following scenario: I have a customer who wants to put an incentive program in place for students taking learning modules and then completing tests. The concept is simple. Award the first 10 people who complete a test with a score of 100