Generate Guid

Flexible GUID-Generator.

You can add Preamble and Suffix – use it like a Code Generator.

Optional settings to get GUIDs for Windows or Linux, uppercase, with hyphens and semicolon..

Generate up to 10.000 GUIDs at once.

http://newguid.dondilo.at/index.php

LeagueManager Plugin – How to create Non-Conference Games in a Championship

Often discussed on the web but never really solved.

This is my solution to enable inter-group/non-conference/across-groups matches in the LeagueManager WordPress Plugin.

You have to customize the plugin source a bit.

Open the file wordpress/wp-content/plugins/leaguemanager/admin/match.php and disable following line of code:


if ( $is_finals ) {
$teams = $championship->getFinalTeams($final);
} else {
$search = "league_id = '".$league->id."' AND `season`  = '".$season['name']."'";
if ( $cup ) {
//$search .= " AND `group` = '".$group."'"; //comment this line here using 2 frontslashes
}

Upload and replace the file. Now you should be able to assign Home and Guest Teams across groups with your Championship.

Facebook Social Plugin – Comments – width 100%

Manipulating the Facebook Comment Social Plugin to appear full width is a bit tricky.

It requires to add code to your stylesheet


.fb-comments, .fb-comments iframe[style], .fb-like-box, .fb-like-box iframe[style] {width: 100% !important;}
.fb-comments span, .fb-comments iframe span[style], .fb-like-box span, .fb-like-box iframe span[style] {width: 100% !important;}
.fb_ltr {width: 100% !important;}

SQL Online Crash Course – Part 4 – Alter Table

Alter Table Pupil Add
Gender varchar(1),
Size decimal(5,2),
Notes varchar(2000);
Command(s) completed successfully.
Alter Table Pupil Alter Column
Name varchar(128);
Command(s) completed successfully.
Select * From Pupil;
Id    Name    DateBirth    Gender    Size    Notes
1    Charly    2004-01-19 00:00:00.000    NULL    NULL    NULL
2    Sandy    2004-05-14 00:00:00.000    NULL    NULL    NULL
3    Jim    2003-12-01 00:00:00.000    NULL    NULL    NULL

SQL Online Crash Course – Part 3 – Select Statement, Filter, Summarize and Group Data

Select * From Pupil;

 

Id    Name    DateBirth
1    Charly    2004-01-19 00:00:00.000
2    Sandy     2004-05-14 00:00:00.000
3    Jim       2003-12-01 00:00:00.000
Select * From Pupil
Where Id = 1;

 

Id    Name    DateBirth
1    Charly    2004-01-19 00:00:00.000
Select * From Pupil
Where DateBirth < '01.01.2004';

 

Id    Name    DateBirth
3    Jim       2003-12-01 00:00:00.000
Select *,
 Floor(DateDiff(day,DateBirth,GetDate())/365.242199) as Age
From Pupil;

 

Id    Name    DateBirth                   Age
1    Charly    2004-01-19 00:00:00.000    9
2    Sandy     2004-05-14 00:00:00.000    9
3    Jim       2003-12-01 00:00:00.000    10
Select Count(1) as Count From Pupil;

 

Count
3
Select Avg(FLOOR(DATEDIFF(day,DateBirth,GETDATE())/365.242199)) as AvgAge
From Pupil;

 

AvgAge
9.333333
Select Year(DateBirth) as Year, Count(1) as Count
From Pupil
Group By Year(DateBirth);

 

Year    Count
2003    1
2004    2