|
-
February 24th, 2011, 02:15 AM
#1
mySQL Query Help
Okay, I am trying to write a query where I want to display a string depending on whether an integer value is low or high. For example, If the amount of money the Dad has in the family database is < 50, I want to list his name, 'Dad', and add the string 'running low on money'. If I count the amount of money for another member in the family and the value is >= 50, the query would add the message 'has lots of money'.
So, my query table would, I think, look something like this:
name | COUNT(money)
Mom | has lots of money
Dad | running low on money
Billy | running low on money
Judy | has lots of money
Any suggestions on how to do this? I do not want to display the INT value, just a choice of two different strings. Each string depends on the COUNT of the column with an INT data type.
Thanks for any help,
msae
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|