hab ich versucht ... ich glaub ich gebs dran#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=latin1' at line 6
lg dirk
Dann versuche es mal ohne:dogsandfun hat geschrieben:hab ich versucht ... ich glaub ich gebs dran#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=latin1' at line 6
lg dirk
Code: Alles auswählen
CREATE TABLE IF NOT EXISTS `phpbb_em_torschuetzen_usermmmm` (
`userid` varchar(4) NOT NULL default '0',
`spielerid` int(4) NOT NULL default '0',
`berechnet` int(2) NOT NULL default '0',
PRIMARY KEY (`userid`)
) TYPE=MyISAM
Ein Fehler ist aufgetreten.
DEBUG MODE
SQL Error : 1146 Table 'v123871.phpbb_em_torschuetzen' doesn't exist
SELECT * FROM `phpbb_em_torschuetzen` order by name, vorname, verein
Line : 338
File : em_round1.php
Irgendwo hakts hier gravierend ... scheint mirEin Fehler ist aufgetreten.
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select distinct spielerid from phpbb_em_torschuetzen_user) ORDE
SELECT * FROM phpbb_em_torschuetzen where spielerid in (select distinct spielerid from phpbb_em_torschuetzen_user) ORDER BY tore DESC
Line : 268
File : admin_em_config.php
1.) sehe ich oben einen Fehler bei mir, die 3x"m" müssen natürlich weg...dogsandfun hat geschrieben:hmm das hat er genommen aber nun habe ich folgendes ...
Ein Fehler ist aufgetreten.
DEBUG MODE
SQL Error : 1146 Table 'v123871.phpbb_em_torschuetzen' doesn't exist
SELECT * FROM `phpbb_em_torschuetzen` order by name, vorname, verein
Line : 338
File : em_round1.phpIrgendwo hakts hier gravierend ... scheint mirEin Fehler ist aufgetreten.
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select distinct spielerid from phpbb_em_torschuetzen_user) ORDE
SELECT * FROM phpbb_em_torschuetzen where spielerid in (select distinct spielerid from phpbb_em_torschuetzen_user) ORDER BY tore DESC
Line : 268
File : admin_em_config.php
LG Dirk
Code: Alles auswählen
CREATE TABLE IF NOT EXISTS `buli2_tippspiel_torschuetzen` (
`spielerid` int(2) NOT NULL auto_increment,
`Name` varchar(30) NOT NULL default '',
`Vorname` varchar(30) default NULL,
`verein` varchar(30) NOT NULL default '0',
`tore` int(2) NOT NULL default '0',
PRIMARY KEY (`spielerid`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
Code: Alles auswählen
if ( $game_time < time() + 1800 )
{
$sql_tips = "SELECT j.*, COUNT(*) AS anzahl
FROM " . EM_TJAEGERTIPPS_TABLE . " t,
" . EM_TJAEGER_TABLE . " j
WHERE t.spielerid = j.spielerid
GROUP BY spielerid
ORDER BY anzahl DESC";
}
else
{
$sql_tips = "SELECT j.*, COUNT(*) AS anzahl
FROM " . EM_TJAEGERTIPPS_TABLE . " t,
" . EM_TJAEGER_TABLE . " j
WHERE t.spielerid = j.spielerid
GROUP BY spielerid
ORDER BY tore DESC";
}
Gute Idee !aliassimba hat geschrieben:Habt ihr eine Idee, wie ich es fertig bringe das vor Begin der EM meine Torschützen nach getippter Anzahl, und danach nach Toren sortiert sind????
Code: Alles auswählen
$sql_tips = "SELECT j.*, COUNT(*) AS anzahl
FROM " . EM_TJAEGERTIPPS_TABLE . " t,
" . EM_TJAEGER_TABLE . " j
WHERE t.spielerid = j.spielerid
GROUP BY spielerid
ORDER BY anzahl DESC";
if( !($result_tips = $db->sql_query($sql_tips)) )
{
message_die(GENERAL_ERROR, 'Could not get player data', '', __LINE__, __FILE__, $sql_tips);
}
$arr_data = array();
$anz_tips = 0;
$int_max = 0;
while ( $row_tips = $db->sql_fetchrow($result_tips) )
{
$arr_data[] = $row_tips;
$anz_tips += $row_tips['anzahl'];
$int_max = max($row_tips['anzahl'], $int_max);
}
if ($anz_tips == 0)
{
message_die(GENERAL_MESSAGE, 'You don\'t need this without tipps.', '', __LINE__, __FILE__, '');
}
$int_timefirst = get_first_gametime();
Code: Alles auswählen
$int_timefirst = get_first_gametime();
$sql_tips = "SELECT j.*, COUNT(*) AS anzahl
FROM " . EM_TJAEGERTIPPS_TABLE . " t,
" . EM_TJAEGER_TABLE . " j
WHERE t.spielerid = j.spielerid
GROUP BY spielerid
ORDER BY ";
$sql_tips .= ($int_timefirst > time()) ? "anzahl DESC, Name, Vorname" : "tore DESC, Name, Vorname";
if( !($result_tips = $db->sql_query($sql_tips)) )
{
message_die(GENERAL_ERROR, 'Could not get player data', '', __LINE__, __FILE__, $sql_tips);
}
$arr_data = array();
$anz_tips = 0;
$int_max = 0;
while ( $row_tips = $db->sql_fetchrow($result_tips) )
{
$arr_data[] = $row_tips;
$anz_tips += $row_tips['anzahl'];
$int_max = max($row_tips['anzahl'], $int_max);
}
if ($anz_tips == 0)
{
message_die(GENERAL_MESSAGE, 'You don\'t need this without tipps.', '', __LINE__, __FILE__, '');
}
Bei mir nichtaliassimba hat geschrieben:Jetzt sortiert er nur noch nach Toren, auch schon vor EM