Jump to content


Photo

MySQL set datatype


  • Please log in to reply
2 replies to this topic

#1 Cruisecar

Cruisecar
  • Members
  • PipPip
  • Member
  • 22 posts

Posted 27 April 2006 - 09:44 PM

Hey,

I have a mysql set datatype, with many different possible values. I need to fetch the current value from the database, and move up to the next value on the set datatype. I read you could do this with numbers some how (eg adding 1)? In the database the set values are basicly a rank system using words.

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]
$query = "select * from users where username='$username'";
$result = mysql_query($query, $con);
$stats = mysql_fetch_array($result);
if($stats['next_lvl'] >= "100")
{
//Rank up to next level script goes here,
} [/quote]

Thankyou

#2 Cruisecar

Cruisecar
  • Members
  • PipPip
  • Member
  • 22 posts

Posted 29 April 2006 - 10:23 AM

Anyone :( ?

#3 Cruisecar

Cruisecar
  • Members
  • PipPip
  • Member
  • 22 posts

Posted 29 April 2006 - 12:02 PM

I guess, i'll change the ranks to number, and make an array with the rank names in. Then link the two.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users