2018

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (average: 4.50 out of 10)
Loading...

[insert_php]
$servername = ‘sql’;
$username = ‘client2285u_aso’;
$password = ‘Almafa01’;
$dbname = ‘client2285db_aso’;

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die(“Connection failed: ” . $conn->connect_error);
}
mysqli_set_charset($conn,’utf8′);
$post = get_the_ID();
$ID = mysqli_real_escape_string($conn,$post);
$sql = “SELECT DISTINCT(select d.nev FROM(select @rownum:=@rownum+1 AS rownum,s.* FROM ( SELECT pilota AS nev, sum(pont) AS Pont,COUNT(DISTINCT CASE WHEN vegeredmeny=’1′ then datum ELSE NULL END) AS ‘Győzelem’,COUNT(DISTINCT CASE WHEN vegeredmeny=’2′ then datum ELSE NULL END) AS ‘2’,COUNT(DISTINCT CASE WHEN vegeredmeny=’3′ then datum ELSE NULL END) AS ‘3’,COUNT(DISTINCT CASE WHEN vegeredmeny=’4′ then datum ELSE NULL END) AS ‘4’,COUNT(DISTINCT CASE WHEN vegeredmeny=’5′ then datum ELSE NULL END) AS ‘5’,COUNT(DISTINCT CASE WHEN vegeredmeny=’6′ then datum ELSE NULL END) AS ‘6’,COUNT(DISTINCT CASE WHEN vegeredmeny=’7′ then datum ELSE NULL END) AS ‘7’,COUNT(DISTINCT CASE WHEN vegeredmeny=’8′ then datum ELSE NULL END) AS ‘8’,COUNT(DISTINCT CASE WHEN vegeredmeny=’9′ then datum ELSE NULL END) AS ‘9’,COUNT(DISTINCT CASE WHEN vegeredmeny=’10’ then datum ELSE NULL END) AS ’10’,COUNT(DISTINCT CASE WHEN vegeredmeny=’11’ then datum ELSE NULL END) AS ’11’,COUNT(DISTINCT CASE WHEN vegeredmeny=’12’ then datum ELSE NULL END) AS ’12’,COUNT(DISTINCT CASE WHEN vegeredmeny=’13’ then datum ELSE NULL END) AS ’13’,COUNT(DISTINCT CASE WHEN vegeredmeny=’14’ then datum ELSE NULL END) AS ’14’,COUNT(DISTINCT CASE WHEN vegeredmeny=’15’ then datum ELSE NULL END) AS ’15’,COUNT(DISTINCT CASE WHEN vegeredmeny=’16’ then datum ELSE NULL END) AS ’16’,COUNT(DISTINCT CASE WHEN vegeredmeny=’17’ then datum ELSE NULL END) AS ’17’,COUNT(DISTINCT CASE WHEN vegeredmeny=’18’ then datum ELSE NULL END) AS ’18’,COUNT(DISTINCT CASE WHEN vegeredmeny=’19’ then datum ELSE NULL END) AS ’19’ ,COUNT(DISTINCT CASE WHEN vegeredmeny=’20’ then datum ELSE NULL END) AS ’20’ FROM futam Where ev=’2018′ group by pilota ORDER BY sum(pont) DESC,COUNT(DISTINCT CASE WHEN vegeredmeny=’1′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’2′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’3′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’4′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’5′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’6′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’7′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’8′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’9′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’10’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’11’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’12’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’13’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’14’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’15’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’16’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’17’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’18’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’19’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’20’ then datum ELSE NULL END) desc ) s,(SELECT @rownum:=0) r) d where rownum=’1′) AS ‘első’,
(SELECT nev from nev WHERE nev =(SELECT (select d.nev FROM(select @rownum:=@rownum+1 AS rownum,s.* FROM ( SELECT pilota AS nev, sum(pont) AS Pont,COUNT(DISTINCT CASE WHEN vegeredmeny=’1′ then datum ELSE NULL END) AS ‘Győzelem’,COUNT(DISTINCT CASE WHEN vegeredmeny=’2′ then datum ELSE NULL END) AS ‘2’,COUNT(DISTINCT CASE WHEN vegeredmeny=’3′ then datum ELSE NULL END) AS ‘3’,COUNT(DISTINCT CASE WHEN vegeredmeny=’4′ then datum ELSE NULL END) AS ‘4’,COUNT(DISTINCT CASE WHEN vegeredmeny=’5′ then datum ELSE NULL END) AS ‘5’,COUNT(DISTINCT CASE WHEN vegeredmeny=’6′ then datum ELSE NULL END) AS ‘6’,COUNT(DISTINCT CASE WHEN vegeredmeny=’7′ then datum ELSE NULL END) AS ‘7’,COUNT(DISTINCT CASE WHEN vegeredmeny=’8′ then datum ELSE NULL END) AS ‘8’,COUNT(DISTINCT CASE WHEN vegeredmeny=’9′ then datum ELSE NULL END) AS ‘9’,COUNT(DISTINCT CASE WHEN vegeredmeny=’10’ then datum ELSE NULL END) AS ’10’,COUNT(DISTINCT CASE WHEN vegeredmeny=’11’ then datum ELSE NULL END) AS ’11’,COUNT(DISTINCT CASE WHEN vegeredmeny=’12’ then datum ELSE NULL END) AS ’12’,COUNT(DISTINCT CASE WHEN vegeredmeny=’13’ then datum ELSE NULL END) AS ’13’,COUNT(DISTINCT CASE WHEN vegeredmeny=’14’ then datum ELSE NULL END) AS ’14’,COUNT(DISTINCT CASE WHEN vegeredmeny=’15’ then datum ELSE NULL END) AS ’15’,COUNT(DISTINCT CASE WHEN vegeredmeny=’16’ then datum ELSE NULL END) AS ’16’,COUNT(DISTINCT CASE WHEN vegeredmeny=’17’ then datum ELSE NULL END) AS ’17’,COUNT(DISTINCT CASE WHEN vegeredmeny=’18’ then datum ELSE NULL END) AS ’18’,COUNT(DISTINCT CASE WHEN vegeredmeny=’19’ then datum ELSE NULL END) AS ’19’ ,COUNT(DISTINCT CASE WHEN vegeredmeny=’20’ then datum ELSE NULL END) AS ’20’ FROM futam Where ev=’2018′ group by pilota ORDER BY sum(pont) DESC,COUNT(DISTINCT CASE WHEN vegeredmeny=’1′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’2′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’3′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’4′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’5′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’6′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’7′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’8′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’9′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’10’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’11’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’12’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’13’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’14’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’15’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’16’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’17’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’18’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’19’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’20’ then datum ELSE NULL END) desc ) s,(SELECT @rownum:=0) r) d where rownum=’2′) z)) AS ‘második’,
(SELECT nev from nev WHERE nev =(SELECT (select d.nev FROM(select @rownum:=@rownum+1 AS rownum,s.* FROM ( SELECT pilota AS nev, sum(pont) AS Pont,COUNT(DISTINCT CASE WHEN vegeredmeny=’1′ then datum ELSE NULL END) AS ‘Győzelem’,COUNT(DISTINCT CASE WHEN vegeredmeny=’2′ then datum ELSE NULL END) AS ‘2’,COUNT(DISTINCT CASE WHEN vegeredmeny=’3′ then datum ELSE NULL END) AS ‘3’,COUNT(DISTINCT CASE WHEN vegeredmeny=’4′ then datum ELSE NULL END) AS ‘4’,COUNT(DISTINCT CASE WHEN vegeredmeny=’5′ then datum ELSE NULL END) AS ‘5’,COUNT(DISTINCT CASE WHEN vegeredmeny=’6′ then datum ELSE NULL END) AS ‘6’,COUNT(DISTINCT CASE WHEN vegeredmeny=’7′ then datum ELSE NULL END) AS ‘7’,COUNT(DISTINCT CASE WHEN vegeredmeny=’8′ then datum ELSE NULL END) AS ‘8’,COUNT(DISTINCT CASE WHEN vegeredmeny=’9′ then datum ELSE NULL END) AS ‘9’,COUNT(DISTINCT CASE WHEN vegeredmeny=’10’ then datum ELSE NULL END) AS ’10’,COUNT(DISTINCT CASE WHEN vegeredmeny=’11’ then datum ELSE NULL END) AS ’11’,COUNT(DISTINCT CASE WHEN vegeredmeny=’12’ then datum ELSE NULL END) AS ’12’,COUNT(DISTINCT CASE WHEN vegeredmeny=’13’ then datum ELSE NULL END) AS ’13’,COUNT(DISTINCT CASE WHEN vegeredmeny=’14’ then datum ELSE NULL END) AS ’14’,COUNT(DISTINCT CASE WHEN vegeredmeny=’15’ then datum ELSE NULL END) AS ’15’,COUNT(DISTINCT CASE WHEN vegeredmeny=’16’ then datum ELSE NULL END) AS ’16’,COUNT(DISTINCT CASE WHEN vegeredmeny=’17’ then datum ELSE NULL END) AS ’17’,COUNT(DISTINCT CASE WHEN vegeredmeny=’18’ then datum ELSE NULL END) AS ’18’,COUNT(DISTINCT CASE WHEN vegeredmeny=’19’ then datum ELSE NULL END) AS ’19’ ,COUNT(DISTINCT CASE WHEN vegeredmeny=’20’ then datum ELSE NULL END) AS ’20’ FROM futam Where ev=’2018′ group by pilota ORDER BY sum(pont) DESC,COUNT(DISTINCT CASE WHEN vegeredmeny=’1′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’2′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’3′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’4′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’5′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’6′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’7′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’8′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’9′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’10’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’11’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’12’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’13’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’14’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’15’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’16’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’17’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’18’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’19’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’20’ then datum ELSE NULL END) desc ) s,(SELECT @rownum:=0) r) d where rownum=’3′) z)) AS ‘harmadik’,

(SELECT kep from nev WHERE nev =(SELECT (select d.nev FROM(select @rownum:=@rownum+1 AS rownum,s.* FROM ( SELECT pilota AS nev, sum(pont) AS Pont,COUNT(DISTINCT CASE WHEN vegeredmeny=’1′ then datum ELSE NULL END) AS ‘Győzelem’,COUNT(DISTINCT CASE WHEN vegeredmeny=’2′ then datum ELSE NULL END) AS ‘2’,COUNT(DISTINCT CASE WHEN vegeredmeny=’3′ then datum ELSE NULL END) AS ‘3’,COUNT(DISTINCT CASE WHEN vegeredmeny=’4′ then datum ELSE NULL END) AS ‘4’,COUNT(DISTINCT CASE WHEN vegeredmeny=’5′ then datum ELSE NULL END) AS ‘5’,COUNT(DISTINCT CASE WHEN vegeredmeny=’6′ then datum ELSE NULL END) AS ‘6’,COUNT(DISTINCT CASE WHEN vegeredmeny=’7′ then datum ELSE NULL END) AS ‘7’,COUNT(DISTINCT CASE WHEN vegeredmeny=’8′ then datum ELSE NULL END) AS ‘8’,COUNT(DISTINCT CASE WHEN vegeredmeny=’9′ then datum ELSE NULL END) AS ‘9’,COUNT(DISTINCT CASE WHEN vegeredmeny=’10’ then datum ELSE NULL END) AS ’10’,COUNT(DISTINCT CASE WHEN vegeredmeny=’11’ then datum ELSE NULL END) AS ’11’,COUNT(DISTINCT CASE WHEN vegeredmeny=’12’ then datum ELSE NULL END) AS ’12’,COUNT(DISTINCT CASE WHEN vegeredmeny=’13’ then datum ELSE NULL END) AS ’13’,COUNT(DISTINCT CASE WHEN vegeredmeny=’14’ then datum ELSE NULL END) AS ’14’,COUNT(DISTINCT CASE WHEN vegeredmeny=’15’ then datum ELSE NULL END) AS ’15’,COUNT(DISTINCT CASE WHEN vegeredmeny=’16’ then datum ELSE NULL END) AS ’16’,COUNT(DISTINCT CASE WHEN vegeredmeny=’17’ then datum ELSE NULL END) AS ’17’,COUNT(DISTINCT CASE WHEN vegeredmeny=’18’ then datum ELSE NULL END) AS ’18’,COUNT(DISTINCT CASE WHEN vegeredmeny=’19’ then datum ELSE NULL END) AS ’19’ ,COUNT(DISTINCT CASE WHEN vegeredmeny=’20’ then datum ELSE NULL END) AS ’20’ FROM futam Where ev=’2018′ group by pilota ORDER BY sum(pont) DESC,COUNT(DISTINCT CASE WHEN vegeredmeny=’1′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’2′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’3′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’4′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’5′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’6′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’7′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’8′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’9′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’10’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’11’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’12’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’13’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’14’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’15’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’16’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’17’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’18’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’19’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’20’ then datum ELSE NULL END) desc ) s,(SELECT @rownum:=0) r) d where rownum=’1′) z)) AS ‘elsőkép’,
(SELECT kep from nev WHERE nev =(SELECT (select d.nev FROM(select @rownum:=@rownum+1 AS rownum,s.* FROM ( SELECT pilota AS nev, sum(pont) AS Pont,COUNT(DISTINCT CASE WHEN vegeredmeny=’1′ then datum ELSE NULL END) AS ‘Győzelem’,COUNT(DISTINCT CASE WHEN vegeredmeny=’2′ then datum ELSE NULL END) AS ‘2’,COUNT(DISTINCT CASE WHEN vegeredmeny=’3′ then datum ELSE NULL END) AS ‘3’,COUNT(DISTINCT CASE WHEN vegeredmeny=’4′ then datum ELSE NULL END) AS ‘4’,COUNT(DISTINCT CASE WHEN vegeredmeny=’5′ then datum ELSE NULL END) AS ‘5’,COUNT(DISTINCT CASE WHEN vegeredmeny=’6′ then datum ELSE NULL END) AS ‘6’,COUNT(DISTINCT CASE WHEN vegeredmeny=’7′ then datum ELSE NULL END) AS ‘7’,COUNT(DISTINCT CASE WHEN vegeredmeny=’8′ then datum ELSE NULL END) AS ‘8’,COUNT(DISTINCT CASE WHEN vegeredmeny=’9′ then datum ELSE NULL END) AS ‘9’,COUNT(DISTINCT CASE WHEN vegeredmeny=’10’ then datum ELSE NULL END) AS ’10’,COUNT(DISTINCT CASE WHEN vegeredmeny=’11’ then datum ELSE NULL END) AS ’11’,COUNT(DISTINCT CASE WHEN vegeredmeny=’12’ then datum ELSE NULL END) AS ’12’,COUNT(DISTINCT CASE WHEN vegeredmeny=’13’ then datum ELSE NULL END) AS ’13’,COUNT(DISTINCT CASE WHEN vegeredmeny=’14’ then datum ELSE NULL END) AS ’14’,COUNT(DISTINCT CASE WHEN vegeredmeny=’15’ then datum ELSE NULL END) AS ’15’,COUNT(DISTINCT CASE WHEN vegeredmeny=’16’ then datum ELSE NULL END) AS ’16’,COUNT(DISTINCT CASE WHEN vegeredmeny=’17’ then datum ELSE NULL END) AS ’17’,COUNT(DISTINCT CASE WHEN vegeredmeny=’18’ then datum ELSE NULL END) AS ’18’,COUNT(DISTINCT CASE WHEN vegeredmeny=’19’ then datum ELSE NULL END) AS ’19’ ,COUNT(DISTINCT CASE WHEN vegeredmeny=’20’ then datum ELSE NULL END) AS ’20’ FROM futam Where ev=’2018′ group by pilota ORDER BY sum(pont) DESC,COUNT(DISTINCT CASE WHEN vegeredmeny=’1′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’2′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’3′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’4′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’5′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’6′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’7′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’8′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’9′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’10’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’11’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’12’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’13’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’14’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’15’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’16’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’17’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’18’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’19’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’20’ then datum ELSE NULL END) desc ) s,(SELECT @rownum:=0) r) d where rownum=’2′) z)) AS ‘másodikkép’,
(SELECT kep from nev WHERE nev =(SELECT (select d.nev FROM(select @rownum:=@rownum+1 AS rownum,s.* FROM ( SELECT pilota AS nev, sum(pont) AS Pont,COUNT(DISTINCT CASE WHEN vegeredmeny=’1′ then datum ELSE NULL END) AS ‘Győzelem’,COUNT(DISTINCT CASE WHEN vegeredmeny=’2′ then datum ELSE NULL END) AS ‘2’,COUNT(DISTINCT CASE WHEN vegeredmeny=’3′ then datum ELSE NULL END) AS ‘3’,COUNT(DISTINCT CASE WHEN vegeredmeny=’4′ then datum ELSE NULL END) AS ‘4’,COUNT(DISTINCT CASE WHEN vegeredmeny=’5′ then datum ELSE NULL END) AS ‘5’,COUNT(DISTINCT CASE WHEN vegeredmeny=’6′ then datum ELSE NULL END) AS ‘6’,COUNT(DISTINCT CASE WHEN vegeredmeny=’7′ then datum ELSE NULL END) AS ‘7’,COUNT(DISTINCT CASE WHEN vegeredmeny=’8′ then datum ELSE NULL END) AS ‘8’,COUNT(DISTINCT CASE WHEN vegeredmeny=’9′ then datum ELSE NULL END) AS ‘9’,COUNT(DISTINCT CASE WHEN vegeredmeny=’10’ then datum ELSE NULL END) AS ’10’,COUNT(DISTINCT CASE WHEN vegeredmeny=’11’ then datum ELSE NULL END) AS ’11’,COUNT(DISTINCT CASE WHEN vegeredmeny=’12’ then datum ELSE NULL END) AS ’12’,COUNT(DISTINCT CASE WHEN vegeredmeny=’13’ then datum ELSE NULL END) AS ’13’,COUNT(DISTINCT CASE WHEN vegeredmeny=’14’ then datum ELSE NULL END) AS ’14’,COUNT(DISTINCT CASE WHEN vegeredmeny=’15’ then datum ELSE NULL END) AS ’15’,COUNT(DISTINCT CASE WHEN vegeredmeny=’16’ then datum ELSE NULL END) AS ’16’,COUNT(DISTINCT CASE WHEN vegeredmeny=’17’ then datum ELSE NULL END) AS ’17’,COUNT(DISTINCT CASE WHEN vegeredmeny=’18’ then datum ELSE NULL END) AS ’18’,COUNT(DISTINCT CASE WHEN vegeredmeny=’19’ then datum ELSE NULL END) AS ’19’ ,COUNT(DISTINCT CASE WHEN vegeredmeny=’20’ then datum ELSE NULL END) AS ’20’ FROM futam Where ev=’2018′ group by pilota ORDER BY sum(pont) DESC,COUNT(DISTINCT CASE WHEN vegeredmeny=’1′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’2′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’3′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’4′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’5′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’6′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’7′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’8′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’9′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’10’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’11’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’12’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’13’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’14’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’15’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’16’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’17’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’18’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’19’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’20’ then datum ELSE NULL END) desc ) s,(SELECT @rownum:=0) r) d where rownum=’3′) z)) AS ‘harmadikkép'”;
$result = mysqli_query($conn, $sql) or die(“Bad Query: $sql”);
while($row=mysqli_fetch_assoc($result)){
echo “

1. ${row[‘első’]} 2. ${row[‘második’]} 3. ${row[‘harmadik’]}

“;
}
$conn->close();

[/insert_php]

[insert_php]
$servername = ‘sql’;
$username = ‘client2285u_aso’;
$password = ‘Almafa01’;
$dbname = ‘client2285db_aso’;

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die(“Connection failed: ” . $conn->connect_error);
}
mysqli_set_charset($conn,’utf8′);
$post = get_the_ID();
$ID = mysqli_real_escape_string($conn,$post);
$sql = “SELECT * FROM evad WHERE ev =(SELECT ev from evad WHERE ID=’$ID’)”;
$result = mysqli_query($conn, $sql) or die(“Bad query: $sql”);
$row= mysqli_fetch_array($result);
echo “
.”
.”
.”“;

$conn->close();
[/insert_php]

[insert_php]
$servername = ‘sql’;
$username = ‘client2285u_aso’;
$password = ‘Almafa01’;
$dbname = ‘client2285db_aso’;

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die(“Connection failed: ” . $conn->connect_error);
}
mysqli_set_charset($conn,’utf8′);
$post = get_the_ID();
$ID = mysqli_real_escape_string($conn,$post);
$sql = “select @rownum:=@rownum+1 AS rownum,s.* FROM ( SELECT pilota AS nev, sum(pont) AS Pont,COUNT(DISTINCT CASE WHEN vegeredmeny=’1′ then datum ELSE NULL END) AS ‘Győzelem’,COUNT(DISTINCT CASE WHEN vegeredmeny=’2′ then datum ELSE NULL END) AS ‘2’,COUNT(DISTINCT CASE WHEN vegeredmeny=’3′ then datum ELSE NULL END) AS ‘3’,COUNT(DISTINCT CASE WHEN vegeredmeny=’4′ then datum ELSE NULL END) AS ‘4’,COUNT(DISTINCT CASE WHEN vegeredmeny=’5′ then datum ELSE NULL END) AS ‘5’,COUNT(DISTINCT CASE WHEN vegeredmeny=’6′ then datum ELSE NULL END) AS ‘6’,COUNT(DISTINCT CASE WHEN vegeredmeny=’7′ then datum ELSE NULL END) AS ‘7’,COUNT(DISTINCT CASE WHEN vegeredmeny=’8′ then datum ELSE NULL END) AS ‘8’,COUNT(DISTINCT CASE WHEN vegeredmeny=’9′ then datum ELSE NULL END) AS ‘9’,COUNT(DISTINCT CASE WHEN vegeredmeny=’10’ then datum ELSE NULL END) AS ’10’,COUNT(DISTINCT CASE WHEN vegeredmeny=’11’ then datum ELSE NULL END) AS ’11’,COUNT(DISTINCT CASE WHEN vegeredmeny=’12’ then datum ELSE NULL END) AS ’12’,COUNT(DISTINCT CASE WHEN vegeredmeny=’13’ then datum ELSE NULL END) AS ’13’,COUNT(DISTINCT CASE WHEN vegeredmeny=’14’ then datum ELSE NULL END) AS ’14’,COUNT(DISTINCT CASE WHEN vegeredmeny=’15’ then datum ELSE NULL END) AS ’15’,COUNT(DISTINCT CASE WHEN vegeredmeny=’16’ then datum ELSE NULL END) AS ’16’,COUNT(DISTINCT CASE WHEN vegeredmeny=’17’ then datum ELSE NULL END) AS ’17’,COUNT(DISTINCT CASE WHEN vegeredmeny=’18’ then datum ELSE NULL END) AS ’18’,COUNT(DISTINCT CASE WHEN vegeredmeny=’19’ then datum ELSE NULL END) AS ’19’ ,COUNT(DISTINCT CASE WHEN vegeredmeny=’20’ then datum ELSE NULL END) AS ’20’ FROM futam Where ev=’2018′ group by pilota ORDER BY sum(pont) DESC,COUNT(DISTINCT CASE WHEN vegeredmeny=’1′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’2′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’3′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’4′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’5′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’6′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’7′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’8′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’9′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’10’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’11’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’12’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’13’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’14’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’15’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’16’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’17’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’18’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’19’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’20’ then datum ELSE NULL END) desc ) s,(SELECT @rownum:=0) r
“;
$result = mysqli_query($conn,$sql) or die(“Bad Query: $sql”);
echo”

“;
echo”

“;
while($row=mysqli_fetch_assoc($result)){
echo”

“;
}
echo”

Helyezés Versenyző Pont
{$row[‘rownum’]} {$row[‘nev’]} {$row[‘Pont’]}

“;
$conn->close();
[/insert_php]

[insert_php]
$servername = ‘sql’;
$username = ‘client2285u_aso’;
$password = ‘Almafa01’;
$dbname = ‘client2285db_aso’;

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die(“Connection failed: ” . $conn->connect_error);
}
mysqli_set_charset($conn,’utf8′);
$post = get_the_ID();
$ID = mysqli_real_escape_string($conn,$post);
$sql = “SELECT DISTINCT(select d.karosszeria FROM(select @rownum:=@rownum+1 AS rownum, s.* FROM ( SELECT Karosszeria AS karosszeria,motor as motor, sum(pont) AS Pont,COUNT(DISTINCT CASE WHEN vegeredmeny=’1′ then datum ELSE NULL END) AS ‘Győzelem’,COUNT(DISTINCT CASE WHEN vegeredmeny=’2′ then datum ELSE NULL END) AS ‘2’,COUNT(DISTINCT CASE WHEN vegeredmeny=’3′ then datum ELSE NULL END) AS ‘3’,COUNT(DISTINCT CASE WHEN vegeredmeny=’4′ then datum ELSE NULL END) AS ‘4’,COUNT(DISTINCT CASE WHEN vegeredmeny=’5′ then datum ELSE NULL END) AS ‘5’,COUNT(DISTINCT CASE WHEN vegeredmeny=’6′ then datum ELSE NULL END) AS ‘6’,COUNT(DISTINCT CASE WHEN vegeredmeny=’7′ then datum ELSE NULL END) AS ‘7’,COUNT(DISTINCT CASE WHEN vegeredmeny=’8′ then datum ELSE NULL END) AS ‘8’,COUNT(DISTINCT CASE WHEN vegeredmeny=’9′ then datum ELSE NULL END) AS ‘9’,COUNT(DISTINCT CASE WHEN vegeredmeny=’10’ then datum ELSE NULL END) AS ’10’,COUNT(DISTINCT CASE WHEN vegeredmeny=’11’ then datum ELSE NULL END) AS ’11’,COUNT(DISTINCT CASE WHEN vegeredmeny=’12’ then datum ELSE NULL END) AS ’12’,COUNT(DISTINCT CASE WHEN vegeredmeny=’13’ then datum ELSE NULL END) AS ’13’,COUNT(DISTINCT CASE WHEN vegeredmeny=’14’ then datum ELSE NULL END) AS ’14’,COUNT(DISTINCT CASE WHEN vegeredmeny=’15’ then datum ELSE NULL END) AS ’15’,COUNT(DISTINCT CASE WHEN vegeredmeny=’16’ then datum ELSE NULL END) AS ’16’,COUNT(DISTINCT CASE WHEN vegeredmeny=’17’ then datum ELSE NULL END) AS ’17’,COUNT(DISTINCT CASE WHEN vegeredmeny=’18’ then datum ELSE NULL END) AS ’18’,COUNT(DISTINCT CASE WHEN vegeredmeny=’19’ then datum ELSE NULL END) AS ’19’ ,COUNT(DISTINCT CASE WHEN vegeredmeny=’20’ then datum ELSE NULL END) AS ’20’ FROM futam Where ev=’2018′ group by karosszeria ORDER BY sum(pont) DESC,COUNT(DISTINCT CASE WHEN vegeredmeny=’1′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’2′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’3′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’4′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’5′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’6′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’7′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’8′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’9′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’10’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’11’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’12’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’13’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’14’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’15’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’16’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’17’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’18’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’19’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’20’ then datum ELSE NULL END) desc ) s,(SELECT @rownum:=0) r) d where rownum=’1′) AS ‘első’,
(SELECT karosszeria from csapatvb WHERE eredmeny=’2.’ AND ev =(SELECT ev from evad WHERE ID=’$ID’)) AS ‘második’,
(SELECT karosszeria from csapatvb WHERE eredmeny=’3.’ AND ev =(SELECT ev from evad WHERE ID=’$ID’)) AS ‘harmadik’,

(SELECT kep from csapat WHERE nev =(SELECT (select d.karosszeria FROM(select @rownum:=@rownum+1 AS rownum, s.* FROM ( SELECT Karosszeria AS karosszeria,motor as motor, sum(pont) AS Pont,COUNT(DISTINCT CASE WHEN vegeredmeny=’1′ then datum ELSE NULL END) AS ‘Győzelem’,COUNT(DISTINCT CASE WHEN vegeredmeny=’2′ then datum ELSE NULL END) AS ‘2’,COUNT(DISTINCT CASE WHEN vegeredmeny=’3′ then datum ELSE NULL END) AS ‘3’,COUNT(DISTINCT CASE WHEN vegeredmeny=’4′ then datum ELSE NULL END) AS ‘4’,COUNT(DISTINCT CASE WHEN vegeredmeny=’5′ then datum ELSE NULL END) AS ‘5’,COUNT(DISTINCT CASE WHEN vegeredmeny=’6′ then datum ELSE NULL END) AS ‘6’,COUNT(DISTINCT CASE WHEN vegeredmeny=’7′ then datum ELSE NULL END) AS ‘7’,COUNT(DISTINCT CASE WHEN vegeredmeny=’8′ then datum ELSE NULL END) AS ‘8’,COUNT(DISTINCT CASE WHEN vegeredmeny=’9′ then datum ELSE NULL END) AS ‘9’,COUNT(DISTINCT CASE WHEN vegeredmeny=’10’ then datum ELSE NULL END) AS ’10’,COUNT(DISTINCT CASE WHEN vegeredmeny=’11’ then datum ELSE NULL END) AS ’11’,COUNT(DISTINCT CASE WHEN vegeredmeny=’12’ then datum ELSE NULL END) AS ’12’,COUNT(DISTINCT CASE WHEN vegeredmeny=’13’ then datum ELSE NULL END) AS ’13’,COUNT(DISTINCT CASE WHEN vegeredmeny=’14’ then datum ELSE NULL END) AS ’14’,COUNT(DISTINCT CASE WHEN vegeredmeny=’15’ then datum ELSE NULL END) AS ’15’,COUNT(DISTINCT CASE WHEN vegeredmeny=’16’ then datum ELSE NULL END) AS ’16’,COUNT(DISTINCT CASE WHEN vegeredmeny=’17’ then datum ELSE NULL END) AS ’17’,COUNT(DISTINCT CASE WHEN vegeredmeny=’18’ then datum ELSE NULL END) AS ’18’,COUNT(DISTINCT CASE WHEN vegeredmeny=’19’ then datum ELSE NULL END) AS ’19’ ,COUNT(DISTINCT CASE WHEN vegeredmeny=’20’ then datum ELSE NULL END) AS ’20’ FROM futam Where ev=’2018′ group by karosszeria ORDER BY sum(pont) DESC,COUNT(DISTINCT CASE WHEN vegeredmeny=’1′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’2′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’3′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’4′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’5′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’6′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’7′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’8′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’9′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’10’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’11’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’12’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’13’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’14’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’15’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’16’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’17’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’18’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’19’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’20’ then datum ELSE NULL END) desc ) s,(SELECT @rownum:=0) r) d where rownum=’2′) z)) AS ‘másodikkép’,
(SELECT kep from csapat WHERE nev =(SELECT karosszeria from csapatvb WHERE eredmeny=’3.’ AND ev=(SELECT ev from evad WHERE ev=(SELECT ev from evad WHERE ID=’$ID’)))) AS ‘harmadikkép'”;
$result = mysqli_query($conn, $sql) or die(“Bad Query: $sql”);
while($row=mysqli_fetch_assoc($result)){
echo “

1. ${row[‘első’]} 2. ${row[‘második’]} 3. ${row[‘harmadik’]}

“;
}
$conn->close();

[/insert_php]

[insert_php]
$servername = ‘sql’;
$username = ‘client2285u_aso’;
$password = ‘Almafa01’;
$dbname = ‘client2285db_aso’;

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die(“Connection failed: ” . $conn->connect_error);
}
mysqli_set_charset($conn,’utf8′);
$post = get_the_ID();
$ID = mysqli_real_escape_string($conn,$post);
$sql = “select @rownum:=@rownum+1 AS rownum, s.* FROM ( SELECT Karosszeria AS karosszeria,motor as motor, sum(pont) AS Pont,COUNT(DISTINCT CASE WHEN vegeredmeny=’1′ then datum ELSE NULL END) AS ‘Győzelem’,COUNT(DISTINCT CASE WHEN vegeredmeny=’2′ then datum ELSE NULL END) AS ‘2’,COUNT(DISTINCT CASE WHEN vegeredmeny=’3′ then datum ELSE NULL END) AS ‘3’,COUNT(DISTINCT CASE WHEN vegeredmeny=’4′ then datum ELSE NULL END) AS ‘4’,COUNT(DISTINCT CASE WHEN vegeredmeny=’5′ then datum ELSE NULL END) AS ‘5’,COUNT(DISTINCT CASE WHEN vegeredmeny=’6′ then datum ELSE NULL END) AS ‘6’,COUNT(DISTINCT CASE WHEN vegeredmeny=’7′ then datum ELSE NULL END) AS ‘7’,COUNT(DISTINCT CASE WHEN vegeredmeny=’8′ then datum ELSE NULL END) AS ‘8’,COUNT(DISTINCT CASE WHEN vegeredmeny=’9′ then datum ELSE NULL END) AS ‘9’,COUNT(DISTINCT CASE WHEN vegeredmeny=’10’ then datum ELSE NULL END) AS ’10’,COUNT(DISTINCT CASE WHEN vegeredmeny=’11’ then datum ELSE NULL END) AS ’11’,COUNT(DISTINCT CASE WHEN vegeredmeny=’12’ then datum ELSE NULL END) AS ’12’,COUNT(DISTINCT CASE WHEN vegeredmeny=’13’ then datum ELSE NULL END) AS ’13’,COUNT(DISTINCT CASE WHEN vegeredmeny=’14’ then datum ELSE NULL END) AS ’14’,COUNT(DISTINCT CASE WHEN vegeredmeny=’15’ then datum ELSE NULL END) AS ’15’,COUNT(DISTINCT CASE WHEN vegeredmeny=’16’ then datum ELSE NULL END) AS ’16’,COUNT(DISTINCT CASE WHEN vegeredmeny=’17’ then datum ELSE NULL END) AS ’17’,COUNT(DISTINCT CASE WHEN vegeredmeny=’18’ then datum ELSE NULL END) AS ’18’,COUNT(DISTINCT CASE WHEN vegeredmeny=’19’ then datum ELSE NULL END) AS ’19’ ,COUNT(DISTINCT CASE WHEN vegeredmeny=’20’ then datum ELSE NULL END) AS ’20’ FROM futam Where ev=’2018′ group by karosszeria ORDER BY sum(pont) DESC,COUNT(DISTINCT CASE WHEN vegeredmeny=’1′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’2′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’3′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’4′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’5′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’6′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’7′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’8′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’9′ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’10’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’11’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’12’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’13’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’14’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’15’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’16’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’17’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’18’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’19’ then datum ELSE NULL END) desc, COUNT(DISTINCT CASE WHEN vegeredmeny=’20’ then datum ELSE NULL END) desc ) s,(SELECT @rownum:=0) r”;
$result = mysqli_query($conn, $sql) or die(“Bad Query: $sql”);
echo”

“;
echo”

“;
while($row=mysqli_fetch_assoc($result)){
echo”

“;
}
echo”

Helyezés Csapat Pont
{$row[‘rownum’]} {$row[‘karosszeria’]} {$row[‘motor’]} {$row[‘Pont’]}

“;
$conn->close();
[/insert_php]




Szólj hozzá

Légy az első hozzászóló

X