Jump to content

shadowfox

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

shadowfox's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Is there any downsides to using sum()? I have to pull the the same data of the sum of 20 other fields and didn't know if it would be best just to leave it using the sum() function or to make php do some work and to create a field that will be updated with the result of the sum of the other fields?
  2. edit: gah, i was looking at another post and posted in the wrong php section.... just making a small switch based on the hour of the day but running into a problem when the time is 00 (24hr clock). it seems to default to the dawn output. even tried to change the code so the night output would be on the top, but it still outputs as dawn when the time is at 0. $test = 0; switch ($test) { case $test >= 6 && $test <= 8: return "dawn(".$test.")"; break; case $test >= 9 && $test <= 17: return "day(".$test.")"; break; case $test >= 18 && $test <= 20: return "evening(".$test.")"; break; case $test >= 21 && $test <= 23 || $test >= 0 && $test <= 5: return "night(".$test.")"; break;
  3. playing around with some php/mysql stuff and so making a small little text game to pass the time while at work. just trying to find out the best way to setup the database for the spells section. since there are some that will only be used by certain races what the best way to set it up to store that info. i had thought about a field in the table for each race that would be a 1/0 and thought about storing it in a serialize array in one field, but that would be some extra php work in the code. Just trying to find the best solution for something like this, since a few other projects I have to work on could use the same type of database work.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.