raf
Active Member
Hey there,
i've been trying to split SQL result into 2 rows, to save some space on a page. I've seen alot of solutions on stackoverflow, but none of them worked for me (my guess would be something with `mysql_query` function).
This is my piece of code, including query and outputing data.
and i'm trying to put it into this:
Those are questions i've found:
i've been trying to split SQL result into 2 rows, to save some space on a page. I've seen alot of solutions on stackoverflow, but none of them worked for me (my guess would be something with `mysql_query` function).
This is my piece of code, including query and outputing data.
PHP:
$perStaffStatsQueryQuery = $SQL->query('SELECT * FROM channel_message WHERE `player_id`>0 AND `channel_id`=9 ORDER BY `count` DESC');
foreach ($perStaffStatsQueryQuery as $staffStatistic) {
$player = new Player();
$player->find($staffStatistic['player_name']);
$main_content .= '<br>
<div class="ui six wide">
<table class="ui table-striped celled table" style="width:447px;margin: 10 auto;">
<thead>
<tr>
<th class="text-center" colspan="3">
<a href="?subtopic=characters&name='.htmlspecialchars($staffStatistic['player_name']).'">
<h3 class="ui inverted header">'.$staffStatistic['player_name'].'</h3>
</a>
<p>'.htmlspecialchars(Website::getGroupName($player->getGroupID())).'</p>
</th>
</tr>
</thead>
<tbody >
<tr>
<td>Help channel replies</td>
<td class="center aligned">'.$staffStatistic['count'].'</td>
</tr>
</tbody>
</table>
</div>';
}
and i'm trying to put it into this:
PHP:
$main_content .= '
<div class="ui equal width grid">
<div class="equal width row">
<div class="column">
<div class="row">
1st member
</div>
<div class="row">
3rd member
</div>
<div class="row">
5th member
</div>
</div>
<div class="column">
<div class="row">
2nd member
</div>
<div class="row">
4th member
</div>
<div class="row">
6th member
</div>
</div>
</div>
</div>
';
Those are questions i've found: