Relation Problem?
Hej, Jeg har et relation problem jeg ved ikke helt hvad der er galt da queryen er rigtig, jeg får bare en timeout fordi den ikke når at loade det hele.Jeg har brugt InnoDB til det, men ændrede det til MyIsam da den var hurtigere har jeg fået afvide. Jeg har også brugt den database type til relationer andre steder.
Det min kode det her hvertfald.
include("overall_head.php");
include("connect.php");
functiON getClass($class_id)
{
$select = mysql_query("SELECT * FROM `classes` WHERE `class_code` = '".$class_id."'")or die(mysql_error());
$data_query = mysql_fetch_assoc($select);
?>
<div class="classCat">
<div class="innerClassCat">
<span class="classIcon"><img src="./classicONs/<?php echo $data_query['img_url']; ?>" title="<?php echo $data_query['class_name']; ?>"></span>
<span class="classText"><?php echo $data_query['class_name']; ?></span>
</div>
</div>
<?php
$select = NULL;
$data_query = NULL;
$select = mysql_query("SELECT * FROM `users` INNER JOIN classes ON classes.class_code = users.char_class INNER JOIN profs ON profs.prof_code = users.char_prof_ONe INNER JOIN profs_two ON profs_two.prof_code_two = users.char_prof_two INNER JOIN flags ON flags.country_code = users.country INNER JOIN races ON races.race_code = users.char_race INNER JOIN pvpranks ON pvpranks.rank_code = users.char_rank WHERE users.approve = '1' AND users.char_class = '".$class_id."'")or die(mysql_error());
echo "<div class=\"classContent\">\n<table id=\"memberlist\" width=\"100%\">";
while($data_query = mysql_fetch_assoc($select))
{
?>
<td class="classRow"><img src="pvpranks/<?php echo $data_query['rank_url'];?>" title="<?php echo $data_query['rank_name'];?>"></td>
<td class="classRow"><a href="http://eu.wowarmory.com/character-sheet.xml?r=<?php echo $data_query['char_realm'];?>&n=<?php echo $data_query['char_name'];?>" target="_blank"><?php echo $data_query['char_name'];?></a></td>
<td class="classRow"><p><?php echo $data_query['char_level'];?></p></td>
<td class="classRow"><img src="races/<?php echo $data_query['race_url']; ?>" title="<?php echo $data_query['race_name']; ?>" border="0">  <img src="classicONs/<?php echo $data_query['img_url'];?>" title="<?php echo $data_query['class_name']; ?>"</td>
<td class="flag_icON"><img src="flagdone/<?php echo $data_query['flag_url']; ?>" title="<?php echo $data_query['country_name']; ?>"></td>
<td class="classRow"><img src="proffs/<?php echo $data_query['prof_url']; ?>" title="<?php echo $data_query['prof_name']; ?>">   <img src="proffs/<?php echo $data_query['prof_url_two']; ?>" title="<?php echo $data_query['prof_name_two']; ?>"
<?php
}
echo "</table>\n</div>";
}
?>
<?php getClass('1'); ?>
<?php getClass('2'); ?>
<?php getClass('3'); ?>
<?php getClass('4'); ?>
<?php getClass('5'); ?>
<?php getClass('6'); ?>
<?php getClass('7'); ?>
<?php getClass('8'); ?>
<?php getClass('9'); ?>
<?php getClass('10'); ?>
<?php
include("overall_foot.php");
?>