Jump to content

boionfire81

Members
  • Content Count

    517
  • Joined

  • Last visited

  • Days Won

    4

boionfire81 last won the day on September 23 2016

boionfire81 had the most liked content!

Community Reputation

7 Neutral

About boionfire81

  • Rank
    Trainee
  • Birthday 10/01/1981

Personal Information

  • Occupation
    caregiver

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Looking for an SVG designer. Message me for details
  2. Let me know when you get it running. I'd love to see it.
  3. [uSER=64684]Dayo[/uSER] I'm only having 2 issues with this. 1) I'd like to echo the time right after the db query. But it looks like this: "in -17056 days, -22:, 0-13:-13" $time=rand(60,180); $totaltime=$time*$_POST['energy']; $ttime=".(time.()+$totaltime)."; echo "You will see daylight again in ".time_format($ttime).". ";   function time_format($time) { $ttime=($time-time()); $days = floor($ttime / 60 / 60 / 24); $hours = floor($ttime / 60 / 60) % 24; $mins = floor($ttime / 60) % 60 % 24; $sec = floor($ttime) % 60 % 60 % 60 % 24; if($days) { $days = "$days days, and "; } else { $days = ""; } if($hours) { $hours = "$hours:"; } else { $hours = ""; } if($mins == 1) { $mins = "1"; } else { $mins = "$mins"; } if($sec == 1) { $sec = ":01"; } else { $sec = ":$sec"; } return $days.$hours.$mins.$sec; }  
  4. boionfire81

    $counter++?

    Well, I tried sniko's. This is basically an hof layout. Each player having a player card with a 3 layer accordion. The accordian id needs to be unique to each player AND the accordion level needs to be unique to itself. i.e. <label id='accordion-1'> <span name='acc-1-1'></span> <span name='acc-1-2'></span> <span name='acc-1-3'></span> NEXT <label id='accordion-2'> <span name='acc-2-4'></span> <span name='acc-2-5'></span> <span name='acc-2-6'></span>  
  5. boionfire81

    $counter++?

    Ok, I'm not to sure what options are available for accomplishing this. I need to set a running counter during a while loop. But I also need to echo that exact same count 4 times during the loop template. Any ideas? I'm thinking a   $counter=1; while($r=$db-fetch_row($q)) { $thiscount=$counter++; }
  6. That changed the layout a bit, but still the same as the previous. The automatic total will not adjust within the submit button for purchase. But since I'm wanting to turn this into more of a shopping cart, allowing more than 1 item purchase at a time, I don't think I'mma worry about this mod for now, anyways. But ty!
  7. yeah it is. Ok so what would be the preferred method?
  8. dude worked perfect (outside of the . next to WHERE). Thanks! I'mma have to read up on the NESTED queries, cause that ^ I can't even read lol. Ok, maybe not 100%. I also need to run a query to pull the last price from stocks. So code for first stock page   $q=$db->query("SELECT DISTINCT `st1`.`stockID`, `st1`.`stockNAME`, `st1`.`stockPRICE` FROM `shares` `st1` WHERE st1.stockSELL > 0 and st1.stockPRICE = (SELECT MIN(st2.stockPRICE) FROM shares st2 WHERE st2.stockID = st1.stockID) ORDER BY st1.stockPRICE ASC"); while($r=$db->fetch_row($q)) { $s=$db->query("SELECT `last` FROM `stock` WHERE `stockID` = {$r['stockID']} ORDER BY `time` ASC LIMIT 1"); $l=$db->fetch_row($s);   After quick check though my time() insert isn't working on purchase. Ok, researching now. Tried UNIX_TIMESTAMP everything I could think. The time always seems to insert as 0000-00-00 00:00:00 no matter how I write it. ONLY thing that worked is NULL... but why?
  9. The distinct I think might be more of what I need. Each member can hold several different stocks. A row is created for each user and their individual stocks. Then there is a column that sets the amount of shares they are willing to sell and how much they are willing to sell for. I need to select the lowest price of each stock. What I have now is simply displaying every single row in the table being queried.   $q=$db->query("SELECT DISTINCT `stockID`, `stockNAME`, `stockPRICE` FROM `shares` WHERE `stockSELL`> 0 ORDER BY `stockPRICE` ASC"); while($r=$db->fetch_row($q)) {
  10. I need to select 1 row for each stockID with the result being the lowest price. $q=$db->query("SELECT `stockID`, `stockNAME`, `stockPRICE` FROM `shares` WHERE `stockSELL`> 0 GROUP BY `stockID` ORDER BY `stockPRICE` ASC"); while($r=$db->fetch_row($q)) {   The where stockSELL does fine. But if there are 2 people selling the stock it list every result for that. >.< I never used group, so this is probably where the error is.
  11. lol. My bad man, I'm just now making it back to this thread. But thanks! Will let you know if it works out.
  12. Yeah, I'mma code it like I remod'd the invade a house mod. Steal the stuff, not the cash :) But yeah, I probably need to think more about the "jury" thing. I was trying to figure out a way to have a court process. Just hadn't gotten there yet ;)
  13. Ok, js, or ajax, or whatever, is far not my strong suit. So, I've used this in replacement to fit mine (js not changed any)   $buyprice=money_formatter($r['itmbuyprice']); ?> <input type='text' name='qty' value='1' onkeyup="tot(<?=$r['itmid']?>,<?=$r['itmbuyprice']?>,this.value);" onfocus="clearText(this);" onblur="returnText(this);"><input type='submit' id="res<?=$r['itmid']?>" value='<?=$buyprice?>'></form> <?   Button displays the price, but does not update to the new price after input.
×
×
  • Create New...