PHP interesse |
|
Ik heb de volgende query:
if ( isset($_POST['show']) && $_POST['show'] != "all" )
{
$query = "SELECT s.idnummer, s.naam, s.statlink, s.ras, d.old_armysize, d.armysize, d.old, d.new, d.KoC_rank, d.KoC_old, d.fortification, d.commander, d.statsid, w.oldrank FROM ranks_static as s, ranks_dynamic as d, weekly_ranks as w WHERE s.idnummer = d.idnummer AND s.idnummer = w.idnummer AND s.ras = ".$_POST['show']." ORDER BY ".$sorteer." ".$_GET['richting']." LIMIT ".$offset.",".$items_per_pagina;
}
else
{
$query = "SELECT s.idnummer, s.naam, s.statlink, s.ras, d.old_armysize, d.armysize, d.old, d.new, d.KoC_rank, d.KoC_old, d.fortification, d.commander, d.statsid, w.oldrank FROM ranks_static as s, ranks_dynamic as d, weekly_ranks as w WHERE s.idnummer = d.idnummer AND s.idnummer = w.idnummer ORDER BY ".$sorteer." ".$_GET['richting']." LIMIT ".$offset.",".$items_per_pagina;
}
$result = mysql_query($query) or die(mysql_error());
if ( isset($_POST['show']) && $_POST['show'] != "all" ) { $query = "SELECT s.idnummer, s.naam, s.statlink, s.ras, d.old_armysize, d.armysize, d.old, d.new, d.KoC_rank, d.KoC_old, d.fortification, d.commander, d.statsid, w.oldrank FROM ranks_static as s, ranks_dynamic as d, weekly_ranks as w WHERE s.idnummer = d.idnummer AND s.idnummer = w.idnummer AND s.ras = ".$_POST['show']." ORDER BY ".$sorteer." ".$_GET['richting']." LIMIT ".$offset.",".$items_per_pagina; } else { $query = "SELECT s.idnummer, s.naam, s.statlink, s.ras, d.old_armysize, d.armysize, d.old, d.new, d.KoC_rank, d.KoC_old, d.fortification, d.commander, d.statsid, w.oldrank FROM ranks_static as s, ranks_dynamic as d, weekly_ranks as w WHERE s.idnummer = d.idnummer AND s.idnummer = w.idnummer ORDER BY ".$sorteer." ".$_GET['richting']." LIMIT ".$offset.",".$items_per_pagina; }
maar krijg telkens deze errror:
Unknown column 'Humans' in 'where clause'
(als ik Humans selecteer)
Unknown column 'Dwarves' in 'where clause'
(als ik Dwarves selecteer)
enz.
kan iemand me helpen ??
|