<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>Peter&#039;s Useful Crap - Topic: Division Record column under Standings</title>
	<link>http://www.theblog.ca/peter-forum/peters-sports-league-standings/division-record-column-under-standings</link>
	<description><![CDATA[Useful tips on Canada, cell phones, banking, technology, WordPress, PHP and more]]></description>
	<generator>Simple:Press Version 5.5.1</generator>
	<atom:link href="http://www.theblog.ca/peter-forum/peters-sports-league-standings/division-record-column-under-standings/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Kyle on Division Record column under Standings</title>
        	<link>http://www.theblog.ca/peter-forum/peters-sports-league-standings/division-record-column-under-standings#p2328</link>
        	<category>Peter's Sports League Standings</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-sports-league-standings/division-record-column-under-standings#p2328</guid>
        	        	<description><![CDATA[<p><strong>Trey said: </strong></p>
<blockquote><p>I just want to say thanks Peter for this code. It is a very useful start to those who need a standings/schedule script. I used it for a site that tracks high school standings. <a href="http://www.vermontscoreboard.com/high-school-standings/?conf=1" rel="nofollow"><a href="http://www.vermontscoreboard.c" rel="nofollow">http://www.vermontscoreboard.c</a>.....gs/?conf=1</a></p>
<p>Also I have to say it cracks me up how no matter how many times you say you do not actively work on the script anymore, people post on here asking you a million questions... half of which are so obvious if you just take a couple hours to examine the code. I am by no means a php or database expert, but if you take some time to look at the code, you can figure out what to adjust or copy/paste to make it work for you.</p>
<p>There are other solutions out there that offer similar results. Yes, they cost money. Guilt tripping Peter into updating the code because you do not want to pay for someone to code it for you is just disrespectful. I suggest people be grateful to have this much code out there for free... I am. Would you rather Peter just delete all the code?</p>
</blockquote>
<hr />
<p>No Trey...and I would pay for a script if I could find one to fit what I need.  I would pay Peter to code it to do what I need it to do.</p>
<p>I've been tearing this script up for quite a while, trying multiple codes and methods, I can't get it done.  If you'd like to help me, you're more than welcome.  I took Peter's code in this forum post, tried it and it didn't work.</p>
<p>Then I tried tearing it apart and customizing it for days, it still didn't work right.</p>
<p>I think this is a wonderful script, but if it doesn't track conference win/loss too, it's useless to me. I'd pay a professional designer to give me a complete custom script, but I'm sorry, I don't make seven figures and can't afford that.  Which is why I appreciate Peter's script so much.</p>
]]></description>
        	        	<pubDate>Wed, 02 Feb 2011 20:26:12 +0000</pubDate>
        </item>
        <item>
        	<title>Trey on Division Record column under Standings</title>
        	<link>http://www.theblog.ca/peter-forum/peters-sports-league-standings/division-record-column-under-standings#p2327</link>
        	<category>Peter's Sports League Standings</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-sports-league-standings/division-record-column-under-standings#p2327</guid>
        	        	<description><![CDATA[<p>I just want to say thanks Peter for this code. It is a very useful start to those who need a standings/schedule script. I used it for a site that tracks high school standings. <a href="http://www.vermontscoreboard.com/high-school-standings/?conf=1" rel="nofollow"><a href="http://www.vermontscoreboard.c" rel="nofollow">http://www.vermontscoreboard.c</a>.....gs/?conf=1</a></p>
<p>Also I have to say it cracks me up how no matter how many times you say you do not actively work on the script anymore, people post on here asking you a million questions... half of which are so obvious if you just take a couple hours to examine the code. I am by no means a php or database expert, but if you take some time to look at the code, you can figure out what to adjust or copy/paste to make it work for you.</p>
<p>There are other solutions out there that offer similar results. Yes, they cost money. Guilt tripping Peter into updating the code because you do not want to pay for someone to code it for you is just disrespectful. I suggest people be grateful to have this much code out there for free... I am. Would you rather Peter just delete all the code?</p>
]]></description>
        	        	<pubDate>Wed, 02 Feb 2011 10:05:02 +0000</pubDate>
        </item>
        <item>
        	<title>hunter on Division Record column under Standings</title>
        	<link>http://www.theblog.ca/peter-forum/peters-sports-league-standings/division-record-column-under-standings#p2325</link>
        	<category>Peter's Sports League Standings</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-sports-league-standings/division-record-column-under-standings#p2325</guid>
        	        	<description><![CDATA[<p>peter we need support for this script<br />
cause you who made this script and yoy know every things about it<br />
so please do not close the door</p>
]]></description>
        	        	<pubDate>Sun, 30 Jan 2011 19:20:31 +0000</pubDate>
        </item>
        <item>
        	<title>Kyle on Division Record column under Standings</title>
        	<link>http://www.theblog.ca/peter-forum/peters-sports-league-standings/division-record-column-under-standings#p2324</link>
        	<category>Peter's Sports League Standings</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-sports-league-standings/division-record-column-under-standings#p2324</guid>
        	        	<description><![CDATA[<p>I'll just do this by hand.  Your script is SO close to what I need, but I need this feature.  If you ever have time, make a post or email me.</p>
<p>It's too bad you don't have time to support this script, but I understand.  I would imagine you have paid projects, those should always be first priority.  Maybe let someone pick this up to further develop/support it?<br />
:cry:</p>
]]></description>
        	        	<pubDate>Sun, 30 Jan 2011 10:27:28 +0000</pubDate>
        </item>
        <item>
        	<title>Peter on Division Record column under Standings</title>
        	<link>http://www.theblog.ca/peter-forum/peters-sports-league-standings/division-record-column-under-standings#p2310</link>
        	<category>Peter's Sports League Standings</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-sports-league-standings/division-record-column-under-standings#p2310</guid>
        	        	<description><![CDATA[<p>Unfortunately I don't have time for more free or paid work right now. Hopefully someone else familiar with MySQL and/or PHP can help.</p>
<p>A quick note, though: winortie value of 3 = play; 1 = beat; 2 = beat by forfeit; 0 = tied; 4 = lost; 5 = lost by forfeit. So it looks like the on-the-fly query is quite complicated: you have to check for winortie of 1 or 2 when the team ID is in the winner (aka Home) field, as well as winortie of 4 or 5 when the team ID is in the loser (aka Away) field, and then match up the other team in that game to the original team's division, just to get divwins.</p>
<p>I can't spend any more time on this right now.  Good luck!</p>
]]></description>
        	        	<pubDate>Sun, 23 Jan 2011 13:24:45 +0000</pubDate>
        </item>
        <item>
        	<title>Kyle on Division Record column under Standings</title>
        	<link>http://www.theblog.ca/peter-forum/peters-sports-league-standings/division-record-column-under-standings#p2305</link>
        	<category>Peter's Sports League Standings</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-sports-league-standings/division-record-column-under-standings#p2305</guid>
        	        	<description><![CDATA[<p>Okay, I'm staring all over with this because it appears that I don't have it organized quite the right way.  However, I'm getting similar results as before...</p>
<p>What I have now is four seasons: 2010-11 Boys SCC, 2010-11 Girls SCC, 2010-11 Boys Bluegrass, and 2010-11 Girls Bluegrass.</p>
<p>Using the 2010-11 Boys SCC season as the example from here on out:</p>
<p>I have one conference set up: South Central Conference</p>
<p>Under that, I have on division (where all of the teams are stored as the conference does not have divisions).</p>
<p>If you need a link to this, let me know and I will message you one...</p>
<p>There are six teams.  Here is what is actually being displayed using this code:</p>
<p><input type="button" class="sfcodeselect" name="sfselectit8656" value="Select Code" onclick="spjSelectCode('sfcode8656');" /></p>
<div class="sfcode" id="sfcode8656">       (SELECT COUNT(*) FROM sportsdb_wins WHERE winner = teamid AND (winortie = 3 or winortie = 1) AND (SELECT teamdiv FROM sportsdb_teams WHERE teamid = loser) = teamdiv) AS divwins,<br />
       (SELECT COUNT(*) FROM sportsdb_wins WHERE loser = teamid AND (winortie = 1 or winortie = 3) AND (SELECT teamdiv FROM sportsdb_teams WHERE teamid = winner) = teamdiv) AS divlosses,</div>
<p>I only have information entered for the top two at the moment...</p>
<p>Team A 4-1<br />
Team B 3-1</p>
<p>What SHOULD be displayed:</p>
<p>Team A 5-1<br />
Team B 5-1</p>
<p>I would be willing to pay a little for your time.  I'm sure it would take someone well versed in this script and PHP very long to crank out code to do this.</p>
]]></description>
        	        	<pubDate>Sat, 22 Jan 2011 15:52:21 +0000</pubDate>
        </item>
        <item>
        	<title>Kyle on Division Record column under Standings</title>
        	<link>http://www.theblog.ca/peter-forum/peters-sports-league-standings/division-record-column-under-standings#p2296</link>
        	<category>Peter's Sports League Standings</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-sports-league-standings/division-record-column-under-standings#p2296</guid>
        	        	<description><![CDATA[<p>Right now, I have two conferences set up, Boys and Girls.  Inside both of those, I have two divisions: South Central and Bluegrass.</p>
<p>So, for instance, I want a column that will display what each team's record is against other teams in their divisions...</p>
<p>So, South Central Team A beat South Central Team B, therefore South Central Team A's division record should be 1-0, and South Central Team B's record should be 0-1.</p>
<p>....</p>
<p>I'm using the standings software a bit differently...using conferences to separate Boys and Girls and using the divisions as conferences (maybe a bit confusing...).</p>
<p>Thanks!</p>
]]></description>
        	        	<pubDate>Mon, 17 Jan 2011 12:24:07 +0000</pubDate>
        </item>
        <item>
        	<title>Peter on Division Record column under Standings</title>
        	<link>http://www.theblog.ca/peter-forum/peters-sports-league-standings/division-record-column-under-standings#p2287</link>
        	<category>Peter's Sports League Standings</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-sports-league-standings/division-record-column-under-standings#p2287</guid>
        	        	<description><![CDATA[<p>The original intent of the code is to return a division wins and losses. Are you trying to track conference wins and losses instead?  (If that's the case, unfortunately I don't currently have time to write up some code for conference records -- you'll have to join in another table since conference associations are stored in the divs table -- but hopefully that prevents you from going down the wrong route.)</p>
]]></description>
        	        	<pubDate>Thu, 13 Jan 2011 20:41:50 +0000</pubDate>
        </item>
        <item>
        	<title>Kyle on Division Record column under Standings</title>
        	<link>http://www.theblog.ca/peter-forum/peters-sports-league-standings/division-record-column-under-standings#p2277</link>
        	<category>Peter's Sports League Standings</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-sports-league-standings/division-record-column-under-standings#p2277</guid>
        	        	<description><![CDATA[<p>I've also tried using this code:  Same thing, wrong numbers, an actual record is 3-0 but it is showing 3-4.  Also, forgot to mention, using either of these codes, only one of the conferences show something besides zeros...</p>
<p>Example, I have four conferences set up: Boys SCC, Girls SCC, Boys Bluegrass and Girls Bluegrass.  The Boys SCC shows numbers (but the wrong ones) and the other three all show 0-0</p>
<p><input type="button" class="sfcodeselect" name="sfselectit5823" value="Select Code" onclick="spjSelectCode('sfcode5823');" /></p>
<div class="sfcode" id="sfcode5823">
<p>&#60;?php }</p>
<p>if ($result_exist) {<br />
        $query=&#34;SELECT teamid, teamname, teamwins, teamties, teamlosses, teamforfeits, teamrf, teamra,<br />
        (teamwins + teamties + teamlosses + teamforfeits) AS gamesplayed,<br />
        (teamwins * $points_win + teamforfeits * $points_forfeit + teamties * $points_tie) AS points,<br />
        (teamrf / ({$results[&#039;gamesplayed&#039;]})) AS teamppg,<br />
        (SELECT COUNT(*) FROM sportsdb_wins WHERE winner = teamid AND (winconf = {$divs[&#039;divid&#039;]}) AND (SELECT teamdiv FROM sportsdb_teams WHERE teamid = loser) = teamdiv - 2) AS divwins,<br />
        (SELECT COUNT(*) FROM sportsdb_wins WHERE loser = teamid AND (winconf = {$divs[&#039;divid&#039;]}) AND (SELECT teamdiv FROM sportsdb_teams WHERE teamid = winner) = teamdiv -2) AS divlosses,<br />
        (teamrf - teamra) AS teamdiff,<br />
        $winning_pct_formula AS winningpct,<br />
        ((({$results[&#039;leadervalue&#039;]}) - (teamwins - teamlosses - teamforfeits)) / 2) AS gamesbehind<br />
        FROM sportsdb_teams<br />
        WHERE teamdiv = {$divs[&#039;divid&#039;]}&#34;;</p>
<p><input type="button" class="sfcodeselect" name="sfselectit3030" value="Select Code" onclick="spjSelectCode('sfcode3030');" /></p>
<div class="sfcode" id="sfcode3030"></div>
</div>
]]></description>
        	        	<pubDate>Sat, 08 Jan 2011 16:53:52 +0000</pubDate>
        </item>
        <item>
        	<title>Kyle on Division Record column under Standings</title>
        	<link>http://www.theblog.ca/peter-forum/peters-sports-league-standings/division-record-column-under-standings#p2276</link>
        	<category>Peter's Sports League Standings</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-sports-league-standings/division-record-column-under-standings#p2276</guid>
        	        	<description><![CDATA[<p>Okay...now I have numbers showing...but they aren't correct...</p>
<p>For instance, a team's actual in-conference is 3-0 but it is displaying 5-5...</p>
<p><input type="button" class="sfcodeselect" name="sfselectit1415" value="Select Code" onclick="spjSelectCode('sfcode1415');" /></p>
<div class="sfcode" id="sfcode1415">
&#60;?php }</p>
<p>if ($result_exist) {<br />
        $query=&#34;SELECT teamid, teamname, teamwins, teamties, teamlosses, teamforfeits, teamrf, teamra,<br />
        (teamwins + teamties + teamlosses + teamforfeits) AS gamesplayed,<br />
        (teamwins * $points_win + teamforfeits * $points_forfeit + teamties * $points_tie) AS points,<br />
        (teamrf / ({$results['gamesplayed']})) AS teamppg,<br />
        (SELECT COUNT(*) FROM sportsdb_wins WHERE winner = teamid AND (winortie = 3 or winortie = 1) AND (SELECT teamdiv FROM sportsdb_teams WHERE teamid = loser) = teamdiv) AS divwins,<br />
        (SELECT COUNT(*) FROM sportsdb_wins WHERE loser = teamid AND (winortie = 1 or winortie = 3) AND (SELECT teamdiv FROM sportsdb_teams WHERE teamid = winner) = teamdiv) AS divlosses,<br />
        (teamrf - teamra) AS teamdiff,<br />
        $winning_pct_formula AS winningpct,<br />
        ((({$results['leadervalue']}) - (teamwins - teamlosses - teamforfeits)) / 2) AS gamesbehind<br />
        FROM sportsdb_teams<br />
        WHERE teamdiv = {$divs['divid']}&#34;;</p>
<p>        if ($standings_sort == 9) {<br />
            $query .= &#34; AND teamid != {$results['teamid']}&#34;;<br />
        }<br />
        $query .= &#34; AND active = 1&#34; . $division_sort . &#34; ORDER BY $sort_order&#34;;</p>
<p>        $result=mysql_query($query);<br />
        $num=mysql_num_rows($result);</p>
<p>        while ($results = mysql_fetch_array($result, MYSQL_ASSOC)) {<br />
            $winningpct=number_format($results['winningpct'], 3);<br />
            $teamppg=number_format($results['teamppg'], 2);<br />
            $gamesbehind = number_format($results['gamesbehind'],1);</p>
<p>            if ($gamesbehind == &#34;0.0&#34;) {<br />
                $gamesbehind = &#34;---&#34;;<br />
            }<br />
?&#62;
</p>
</div>
]]></description>
        	        	<pubDate>Fri, 07 Jan 2011 22:55:03 +0000</pubDate>
        </item>
</channel>
</rss>