Jump to content

TimUSA

Members
  • Posts

    151
  • Joined

  • Last visited

    Never

Everything posted by TimUSA

  1. I am starting to dread coming here for help.....rrrfff whats wrong here with my update code?: global $scripturl , $context; echo' <a href="http://vsk-ayc.totalh.com/index.php?page=221">RETURN TO THE START PAGE</a><br> <table class = "bordercolor" cellSpacing="1" cellPadding="1" width="100%" border="0"> <tr class ="catbg"> <td width = "100%">Recent Race Reports:</td> </tr> </table> <form action="'.$scripturl.'?page=221'.$GET['page'].'" method="post"> <input id="submitted" name="submitted" type="hidden" value="TRUE" />'; $raceq = "SELECT race_table.raceID, race_table.raceDate, race_table.hostName, race_table.boatsInRace, race_table.seriesID, series_table.seriesName, race_table.factor , race_screenshots_table.imageURL, race_table.approved FROM race_table LEFT JOIN series_table ON race_table.seriesID = series_table.seriesID LEFT JOIN race_screenshots_table ON race_table.raceID = race_screenshots_table.raceID ORDER BY raceID DESC;"; $result = mysql_query($raceq); while($row = mysql_fetch_array($result)) { $raceID = $row['raceID']; echo '<br /> <table class="bordercolor" cellSpacing="1" cellPadding="1" width="100%" border="0"> <tr class ="catbg"> <td>Race ID:</td> <td>Date:</td> <td>Host Name:</td> <td>Boats:</td> <td>Series Name:</td> <td>Factor</td> <td>Image URL:</td> <td>Approved</td> </tr> <tr class="catbg4"> <td width="10%">' . $row['raceID'] . '</td> <td width="10%">' . $row['raceDate'] . '</td> <td width="20%">' . $row['hostName'] . '</td> <td width="10%">' . $row['boatsInRace'] . '</td> <td width="20%">' . $row['seriesName'] . '</td> <td width="5%">' . $row['factor'] . '</td> <td width="20%"> <a href="javascript:void(window.open(\'' . $row['imageURL'] .'\',\'\',\' resizable=yes,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no, fullscreen=no,dependent=no,width=1024,height=768\'))">VIEW IMAGE</a></td>'; if ($context['allow_admin'] AND $row['approved'] != "Yes") { echo' <td width = "5%"> <select id="approved" name="approved" style="WIDTH: 50px" value ="" /> <option value="Yes">Yes</option> <option value="No">No</option></td> </tr> </table> <table class = "bordercolor" cellSpacing="1" cellPadding="1" width="100%" border="0"> <TR class ="windowbg3"> <td width = "20%">Skipper Name</td> <td width = "20%">Position</td> <td width = "20%">Race Points</td> <td width = "20%">Match Points</td> <td width = "20%">Fleet Points</td> </tr> </table>'; } else echo' <td width = "5%">' . $row['approved'] . '</td> </tr> </table> <table class = "bordercolor" cellSpacing="1" cellPadding="1" width="100%" border="0"> <TR class ="windowbg3"> <td width = "20%">Skipper Name</td> <td width = "20%">Position</td> <td width = "20%">Race Points</td> <td width = "20%">Match Points</td> <td width = "20%">Fleet Points</td> </tr> </table>'; $ptsq = "SELECT race_table.raceID , pts_table.skipperName, pts_table.position, pts_table.racePoints , pts_table.matchPoints , pts_table.fleetPoints FROM pts_table LEFT OUTER JOIN race_table ON pts_table.raceID = race_table.raceID WHERE race_table.raceID = '$raceID' GROUP BY pts_table.skipperName, race_table.raceID ORDER BY race_table.raceID, pts_table.racePoints DESC LIMIT 0 , 30;"; $result2 = mysql_query($ptsq); while($row2 = mysql_fetch_array($result2)) { echo' <TABLE class = "bordercolor" cellSpacing="1" cellPadding="1" width="100%" border="0"> <TR class ="windowbg3"> <TD width = "20%">' . $row2['skipperName'] . '</td> <TD width = "20%">' . $row2['position'] . '</td> <TD width = "20%">' . $row2['racePoints'] . '</td> <TD width = "20%">' . $row2['matchPoints'] . '</td> <TD width = "20%">' . $row2['fleetPoints'] . '</td> </tr> </table>'; } } if ($context['allow_admin']) { echo' <br> <table class = "bordercolor" cellSpacing="1" cellPadding="1" width="100%" border="0"> <tr class ="catbg"> <td>Submit Approvals:</td> </tr> </table> <br> <table> <tr> <INPUT type="submit" value="Submit"><INPUT type="reset" value="Reset"> </tr> </table> </form>'; } if (isset($_POST['submitted'])) { while (isset($_POST['approved'])) { echo $_POST['approved']; $approved = mysql_real_escape_string($_POST['approved']); mysql_query ("UPDATE race_table.approved SET race_table.approved = '$approved' WHERE race_table.raceID = '$raceID';"); } }
  2. which is 93600 seconds btw, whats the deal with a time limit on modifying a post??
  3. ok so still a bit confused, how would I add 1 day and 2 hours to this for $newdate = if (gmdate("l H:m") >= "Tuesday 17:00") { $newdate = gmdate("m/d/Y H:i e"); echo $newdate; }
  4. sorry what I was trying to express here was than $date1 = "date(m/d+1/Y H+2:M UTC" where d=current day +1 and H = current Hour + 2
  5. I dont really understand the PHP time functions yet so I will ask this here before I have hours of headaches! What I am trying to accomplish is something like this: get current date/time UTC if current date/time is Tuesday 23:00 UTC than $date1 = "date(m/d+1/Y H+2:M UTC" can someone please help me?
  6. everything was fine and then... this is the code that triggered it? global $scripturl; echo' <a href="http://vsk-ayc.totalh.com/index.php?page=210">RETURN TO THE START PAGE</a><br> <TABLE class = "bordercolor" cellSpacing="1" cellPadding="1" width="100%" border="0"> <TR class ="catbg"> <TD width = "100%">Recent Race Reports:</td> </table>'; $raceq = "SELECT race_table.raceID, race_table.raceDate, race_table.hostName, race_table.boatsInRace, race_table.seriesID, series_table.seriesName, race_screenshots_table.imageURL, race_table.approved FROM race_table LEFT JOIN series_table ON race_table.seriesID = series_table.seriesID LEFT JOIN race_screenshots_table ON race_table.raceID = race_screenshots_table.raceID ORDER BY raceID DESC;"; $result = mysql_query($raceq); while($row = mysql_fetch_array($result)) { echo' <br> <TABLE class = "bordercolor" cellSpacing="1" cellPadding="1" width="100%" border="0"> <TR class ="catbg"> <TD width = "10%">Race ID:</td> <TD width = "10%">Date:</td> <TD width = "20%">Host Name:</td> <TD width = "10%">Boats In Race:</td> <TD width = "20%">Series Name:</td> <TD width = "25%">Image URL:</td> <TD width = "5%">Approved:</td> </table> <TABLE class = "bordercolor" cellSpacing="1" cellPadding="1" width="100%" border="0"> <TR class ="catbg4"> <TD width = "10%">' . $row['raceID'] . '</td> <TD width = "10%">' . $row['raceDate'] . '</td> <TD width = "20%">' . $row['hostName'] . '</td> <TD width = "10%">' . $row['boatsInRace'] . '</td> <TD width = "20%">' . $row['seriesName'] . '</td> <TD width = "25%"> <a href="javascript:void(window.open(\'' . $row['imageURL'] .'\',\'\',\'resizable=yes, location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,fullscreen=no,dependent=no,width=1024,height=768\'))"> VIEW IMAGE</a> </td> <TD width = "5%">' . $row['approved'] . '</td> </table>'; while ($raceID = $row['raceID']) { $ptsq = "SELECT race_table.raceID , pts_table.skipperName, pts_table.position, pts_table.racePoints , pts_table.ladderPoints FROM pts_table LEFT OUTER JOIN race_table ON pts_table.raceID = race_table.raceID WHERE race_table.raceID = '$raceID' GROUP BY pts_table.skipperName, race_table.raceID ORDER BY race_table.raceID, pts_table.racePoints DESC LIMIT 0 , 50;"; $result2 = mysql_query($ptsq); while($row2 = mysql_fetch_array($result2)) { echo' <TABLE class = "bordercolor" cellSpacing="1" cellPadding="1" width="95%" border="0"> <TR class ="windowbg"> <TD width = "40%">' . $row2['skipperName'] . '</td> <TD width = "20%">' . $row2['position'] . '</td> <TD width = "20%">' . $row2['racePoints'] . '</td> <TD width = "20%">' . $row2['ladderPoints'] . '</td> </table>'; } } }
  7. What does this mean? User 'vskayc_vsk' has exceeded the 'max_questions' resource (current value: 120000)
  8. the table shown uses a low point scoring system for finish positions where: (it should also be noted that this was generated in another software package) 1 = 0pts 2 = 3 3 = 5.7 ect so the lowest total points scored = 1st place in the sorting in my db i use a high point system so highest points = 1st place in the sorting but the principle is the same. the points calculation is down in another script.
  9. the Pl(1.R) ect... would be Position in Race 1 or for our purposes Position in raceID with the numbers inside that column being the finish position. The brackets are for discarded races (not count in total.) This is often done in regatta scoring, and basically gives the sailor the option of throwing out the worst race. For My purposes we dont need to do that,
  10. I run a gaming site and we have events as follows: Sunday / Wed / Friday 0100 GMT 0600 GMT 0900 GMT 2000 GMT as for right now, I am using this script fo countdown, but obviously the problem is I am constantly having to change it 4x per day / every 3 days <center><script language="JavaScript"> TargetDate = "01/13/2008 1:00 AM UTC"; ForeColor = "black"; CountActive = true; CountStepper = -1; LeadingZero = true; DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes until Zone A races."; FinishMessage = "Zone A races have started."; </script> <script language="JavaScript" src="http://scripts.hashemian.com/js/countdown.js"></script></center> is there a script out there somewhere that will automatically loop so i dont have to keep messing with this?
  11. basically like this: which is wrong, but it works for now! and the full code for the page is this: global $scripturl; echo' <a href="http://vsk-ayc.totalh.com/index.php?page=210">RETURN TO THE START PAGE</a><br>'; $query1 = "SELECT seriesName FROM series_table WHERE seriesID NOT IN ( 1, 2 ) LIMIT 0 , 30;"; $result = mysql_query($query1); echo ' <TABLE class = "bordercolor" cellSpacing="1" cellPadding="1" width="95%" border="0"> <TR class ="catbg"> <TD width = "100%">Series Results:</td> </table> <form action="'.$scripturl.'?page=214'.$GET['page'].'" method="post"> <input type="hidden" name="submitted" value="true"> <table> <tr> <td align="left"><p><b>Select Race Series To View :</b></p><SELECT id="series" name="series" style="WIDTH: 200px" value ="'; echo '" />'; while($row = mysql_fetch_row($result)) { print("<option value=\"$row[0]\">$row[0]</option>"); } echo' </select></td> </tr> <tr> <td><input type="submit" value="Submit"> <input type="reset" value="Reset"></td> </tr> </table> </form><br>'; if (isset($_POST['submitted'])) { $series = mysql_real_escape_string($_POST['series']); $seriesq = "SELECT seriesID FROM series_table WHERE seriesName = '$series';"; $result2 = mysql_query($seriesq); $row2 = mysql_fetch_row($result2); $seriesID = $row2[0]; $raceq = "SELECT pts_table.skipperName, sum( pts_table.racePoints ) AS sumseries FROM pts_table LEFT OUTER JOIN race_table ON pts_table.raceID = race_table.raceID WHERE race_table.seriesID = '$seriesID' GROUP BY pts_table.skipperName ORDER BY sumseries DESC;"; $result3 = mysql_query($raceq); echo' <TABLE class = "bordercolor" cellSpacing="1" cellPadding="1" width="95%" border="0"> <TR class ="catbg"> <TD width = "100%">' . $series . '</td> </table> <TABLE class = "bordercolor" cellSpacing="1" cellPadding="1" width="95%" border="0"> <TR class ="catbg4"> <TD width = "75%">Skipper Name:</td> <TD width = "25%">Total Race Points:</td> </table>'; $x = 1; while($row3 = mysql_fetch_array($result3)) { echo' <TABLE class = "bordercolor" cellSpacing="1" cellPadding="1" width="95%" border="0"> <TR> <TD width = "75%" class = "titlebg">' . $x++ . ': ' . $row3['skipperName'] . '</td><br> <TD width = "25%" class = "catbg2">' . $row3['sumseries'] . '</td><br> </tr> </table>'; } echo' <br> <TABLE class = "bordercolor" cellSpacing="1" cellPadding="1" width="95%" border="0"> <TR class ="catbg"> <TD width = "100%">Individual Race Results</td> </table> <TABLE class = "bordercolor" cellSpacing="1" cellPadding="1" width="95%" border="0"> <TR class ="catbg4"> <TD width = "10%">Race ID:</td> <TD width = "10%">Date:</td> <TD width = "40%">Skipper Name:</td> <TD width = "20%">Position:</td> <TD width = "20%">Race Points:</td> </table>'; $ptsq = "SELECT race_table.raceID, race_table.raceDate, pts_table.skipperName, pts_table.position, pts_table.racePoints FROM pts_table LEFT OUTER JOIN race_table ON pts_table.raceID = race_table.raceID WHERE race_table.seriesID = '$seriesID' GROUP BY pts_table.skipperName, race_table.raceID ORDER BY race_table.raceID, pts_table.racePoints DESC;"; $result4 = mysql_query($ptsq); while($row4 = mysql_fetch_array($result4)) { echo' <TABLE class = "bordercolor" cellSpacing="1" cellPadding="1" width="95%" border="0"> <TR class ="windowbg"> <TD width = "10%">' . $row4['raceID'] . '</td> <TD width = "10%">' . $row4['raceDate'] . '</td> <TD width = "40%">' . $row4['skipperName'] . '</td> <TD width = "20%">' . $row4['position'] . '</td> <TD width = "20%">' . $row4['racePoints'] . '</td> </table>'; } } and aqain, trying to get it t olook more like this: [attachment deleted by admin]
  12. i am assuming you mean what does the query look like when it is run, so here we go: [attachment deleted by admin]
  13. well maybe close, what i cant seem to get is 1. one table column for skipperName -table rows with names grouped 2. one table column for each race id -table rows with position / points for that particular raceID (this would expand out for however many raceIDs) 3. one table column for total -this would add the points from all the other columns Last but not least I need to sort the rows by total points. in this case the math is easier to do in php because their are some variables for discards that will be set. wow, this is a pain.
  14. correct. but how do i get the raceID as the column headers? if I do this inside while($row3 = mysql_fetch_array($result3)) { then it will loop the header?
  15. still lost on this, but getting closer. the queries are as follows: if (isset($_POST['submitted'])) { $series = mysql_real_escape_string($_POST['series']); $seriesq = "SELECT seriesID FROM series_table WHERE seriesName = '$series';"; $result2 = mysql_query($seriesq); $row2 = mysql_fetch_row($result2); $seriesID = $row2[0]; $raceq = "SELECT race_table.raceID, race_table.raceDate, pts_table.skipperName, pts_table.position, pts_table.racePoints FROM pts_table LEFT OUTER JOIN race_table ON pts_table.raceID = race_table.raceID WHERE race_table.seriesID = '$seriesID' GROUP BY pts_table.skipperName, race_table.raceID ORDER BY race_table.raceID, pts_table.racePoints DESC;"; $result3 = mysql_query($raceq); while($row3 = mysql_fetch_array($result3)) { echo' //DO STUFF } } and this is where I got with this, in a separate conversation, however I don't know how to execute this in PHP so end of the short is trying to get a table that looks like similar to this (css stuff later important thing is to get the colums and rows): [attachment deleted by admin]
  16. yep this is done in another query and then WHERE race_table.seriesID = '$seriesID';";
  17. the relevent info in the two tables look something like this race_table raceID / raceDate / seriesID 1 01/02/08 5 //if you see the full code, the cuurent query filters raceID by a selected seriesID 2 01/03/08 5 3 01/04/08 5 pts_table ptsID / raceID / skipperName / position / racePoints 1 1 skip1 1 50 2 1 skip2 2 47 3 1 skip3 3 44 4 2 skip1 1 50 5 2 skip2 2 47 6 2 skip3 3 44 7 3 skip1 1 50 8 3 skip2 2 47 9 3 skip3 3 44 if this helps at all
  18. hmmm stumped again: what i need is Unique Unique raceID raceID Name: Date Date ect... Total Pts. Player 1 pos/pts pos/pts ect... totpts (for UniqueID) (for UniqueID) Player 2 pos/pts pos/pts ect... totpts (for UniqueID) (for UniqueID) Player 3 pos/pts pos/pts ect... totpts (for UniqueID) (for UniqueID) Player 4 pos/pts pos/pts ect... totpts (for UniqueID) (for UniqueID) and then a column for each unique raceID is formed am positive my query is wrong for this, but am lost $raceq = "SELECT race_table.raceID, race_table.raceDate, pts_table.skipperName, pts_table.position, pts_table.racePoints FROM race_table LEFT JOIN pts_table ON race_table.raceID = pts_table.raceID WHERE race_table.seriesID = '$seriesID';";
  19. figured i could do that with php also forgot to note that what i am trying to acheive is a column for each raceID/date but have the skipper name grouped so only appearing on table once.
  20. SKIPPER NAME $row3['raceID'] / $row3['raceDate'] TOTAL POINTS $row3['skipperName'] $row3['position'] / $row3['racePoints'] total of points in row if $row3['position'] is Null = 0 if $row3['racePoints'] is Null = 0 easier to read?
  21. I have this code: $raceq = "SELECT race_table.raceID, race_table.raceDate, pts_table.skipperName, pts_table.position, pts_table.racePoints FROM race_table LEFT JOIN pts_table ON race_table.raceID = pts_table.raceID WHERE race_table.seriesID = '$seriesID';"; $result3= mysql_query($raceq); while ($row3 = mysql_fetch_array($result3)) { echo' <table> <tr> <td>' . $row3['raceID'] . '</td> <td>' . $row3['raceDate'] . '</td> <td>' . $row3['skipperName'] . '</td> <td>' . $row3['position'] . '</td> <td>' . $row3['racePoints'] . '</td> </tr> </table>'; } which produces this data: and i want it to look like this: anyone wanna take a stab at this? my guess is i need to change the query, but i am stumped:(
×
×
  • 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.