P
Paradizogeeko
Guten Abend,
ich wollte eine einfach Abfrage von der mySQL-DB durchführen.
Jedoch sollen zwei Datensätze in einer Abfrage abgefragt werden.
Das sieht dann alles so aus: *click*
Jedoch möchte ich jetzt, dass Satz1 links ist, dann Satz2 wieder rechts, Satz3 links, ... usw.
Man könnte es durch ne if-schleife lösen, habs aber nicht perfekt hinbekommen. Ich denke es gibt auch noch eine bessere Lösung.
Danke schon mal
- iku
ich wollte eine einfach Abfrage von der mySQL-DB durchführen.
Jedoch sollen zwei Datensätze in einer Abfrage abgefragt werden.
PHP:
<?PHP
$member_info_get = mysql_query("select * from nth_member where id >= '1'");
while($member_info = mysql_fetch_array($member_info_get))
{
echo "<table width=\"500\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
<tr>
<td height=\"110\" width=\"250\">
<table width=\"250\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
<tr>
<td width=\"90\" valign=\"middle\" align=\"center\"><img src=\"./pics/user/" . $member_info['userpic'] . "\" width=\"80\" height=\"100\" border=\"0\" alt=\"\"></td>
<td width=\"160\">
<table width=\"160\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
<tr>
<td>" . $member_info['nick'] . "</td>
</tr>
<tr>
<td> " . $member_info['alter'] . "</td>
</tr>
<tr>
<td> " . $member_info['nthsince'] . "</td>
</tr>
<tr>
<td> " . $member_info['game'] . "</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width=\"250\">
<table width=\"250\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
<tr>
<td width=\"160\">
<table width=\"160\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
<tr>
<td align=\"right\">" . $member_info['nick'] . "</td>
</tr>
<tr>
<td align=\"right\">" . $member_info['alter'] . " </td>
</tr>
<tr>
<td align=\"right\">" . $member_info['nthsince'] . " </td>
</tr>
<tr>
<td align=\"right\">" . $member_info['game'] . " </td>
</tr>
</table></td>
<td width=\"90\" valign=\"middle\" align=\"center\"><img src=\"./pics/user/" . $member_info['userpic'] . "\" width=\"80\" height=\"100\" border=\"0\" alt=\"\">
</td>
</tr>
</table></td>
</tr>
</table>";
}
?>
Das sieht dann alles so aus: *click*
Jedoch möchte ich jetzt, dass Satz1 links ist, dann Satz2 wieder rechts, Satz3 links, ... usw.
Man könnte es durch ne if-schleife lösen, habs aber nicht perfekt hinbekommen. Ich denke es gibt auch noch eine bessere Lösung.
Danke schon mal
- iku