RE: FW: Even or Odds numbers

2010-08-31 Thread Michael . Coll-Barth
My apologies. With your example; SELECT MOD( X, 2 ), it will do exactly as you say it will do. -Original Message- From: Christoph Boget [mailto:christoph.bo...@gmail.com] Sent: Tuesday, August 31, 2010 2:26 PM To: Coll-Barth, Michael Cc: mysql@lists.mysql.com Subject: Re: FW: Even or

Re: FW: Even or Odds numbers

2010-08-31 Thread Christoph Boget
>> where X is your number (or column name).  If 0, it's even if >> 1 it's odd. > I think you mean, if it is non-zero, then it is odd. If you're MODding using 2 as the second argument, it's always going to be 0 or 1. 2 either divides in to the number evenly, having a remainder of 0, or it'll have

RE: Even or Odds numbers

2010-08-31 Thread Daevid Vincent
-Original Message- > From: Mike Blezien [mailto:mick...@frontiernet.net] > Sent: Tuesday, August 31, 2010 11:13 AM > To: jcbo...@yahoo.com > Cc: MySQL List > Subject: Re: Even or Odds numbers > > - Original Message - > From: "Christoph Boget" > To: &

Re: Even or Odds numbers

2010-08-31 Thread Mike Blezien
- Original Message - From: "Christoph Boget" To: "Mike Blezien" Cc: "MySQL List" Sent: Tuesday, August 31, 2010 1:06 PM Subject: Re: Even or Odds numbers is there a function, using MySQL 5.0v, that can detect if a numerical value is either an Ev

FW: Even or Odds numbers

2010-08-31 Thread Michael . Coll-Barth
> -Original Message- > From: Christoph Boget [mailto:christoph.bo...@gmail.com] > http://dev.mysql.com/doc/refman/5.0/en/mathematical-functions. html#function_mod > > SELECT MOD( X, 2 ) > > where X is your number (or column name). If 0, it's even if > 1 it's odd. I think you mean,

Re: Even or Odds numbers

2010-08-31 Thread Christoph Boget
> is there a function, using MySQL 5.0v, that can detect if a numerical value > is either an Even or Odd number MOD() http://dev.mysql.com/doc/refman/5.0/en/mathematical-functions.html#function_mod SELECT MOD( X, 2 ) where X is your number (or column name). If 0, it's even if 1 it's odd. thnx

RE: Even or Odds numbers

2010-08-31 Thread Jay Blanchard
[snip] is there a function, using MySQL 5.0v, that can detect if a numerical value is either an Even or Odd number [/snip] You can use modulus http://www.roseindia.net/sql/mysql-example/mysql-modulus.shtml -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscr

Even or Odds numbers

2010-08-31 Thread Mike Blezien
Hello, is there a function, using MySQL 5.0v, that can detect if a numerical value is either an Even or Odd number Thanks, Mike(mickalo)Blezien =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Thunder Rain Internet Publishing Custom Programming & Web Hosting Services http://www.thunder-rai