- Joined
- Jun 27, 2009
- Messages
- 1,571
- Reaction score
- 170
SELECT * FROM users and users_currency WHERE `rank` <= '10' and type = 5 ORDER BY `respect` DESC LIMIT 5");
SELECT username,look,motto,credits,amount FROM users INNER JOIN users_currency ON users.id=users_currency.user_id WHERE users_currency.type = '5' AND users.rank < 5 ORDER BY users_currency.amount
Something like this.
PHP:SELECT username,look,motto,credits,amount FROM users INNER JOIN users_currency ON users.id=users_currency.user_id WHERE users_currency.type = '5' AND users.rank < 5 ORDER BY users_currency.amount
Why code box is so tiny?
<?php
$getTime = mysql_query("SELECT username,look,motto,online_time FROM users INNER JOIN users_settings ON users.id=users_settings.user_id WHERE users_settings.online_time AND users.rank < 5 ORDER BY users_settings.online_time");
$time = 3600*24; // 60*60*24
while($TimeStats = mysql_fetch_array($getTime)) {
echo '
<tr>
<td width="25%"><img src="http://www.habbo.com/habbo-imaging/avatarimage?figure=' . $TimeStats['look'] . '&size=m&direction32&head_direction=3&gesture=sml" align="left"></td>
<td width="75%"><a href="{url}/home/'.$TimeStats['username'].'"><b>'.$TimeStats['username'].'</b></a><br />'.$TimeStats['online_time'].' Hours</td>
</tr>';
}
?>
echo date('h \h\o\u\r\s, i \m\i\n\u\t\e\s, s \s\e\c\o\n\d\s', $TimeStats['online_time']);
PHP:echo date('h \h\o\u\r\s, i \m\i\n\u\t\e\s, s \s\e\c\o\n\d\s', $TimeStats['online_time']);
More aboutYou must be registered to see links
Show me the error
White page means php syntax error. Have u defined $TimeStats. before use it in that code? Check the code again.
<?php
$getTime = mysql_query("SELECT username,look,motto,online_time FROM users INNER JOIN users_settings ON users.id=users_settings.user_id WHERE users_settings.online_time AND users.rank < 5 ORDER BY users_settings.online_time");
$time = 3600*24; // 60*60*24
while($TimeStats = mysql_fetch_array($getTime)) {
echo '
<tr>
<td width="25%"><img src="http://www.habbo.com/habbo-imaging/avatarimage?figure=' . $TimeStats['look'] . '&size=m&direction32&head_direction=3&gesture=sml" align="left"></td>
<td width="75%"><a href="{url}/home/'.$TimeStats['username'].'"><b>'.$TimeStats['username'].'</b></a><br /><?php echo date('h \h\o\u\r\s, i \m\i\n\u\t\e\s, s \s\e\c\o\n\d\s', $TimeStats['online_time']); ?></td>
</tr>';
}
?>
Parse error: syntax error, unexpected 'h' (T_STRING), expecting ',' or ';' in C:\xampp\htdocs\app\tpl\skins\Habbo\topstats.php on line 156
Why code box is so tiny?
Error
PHP:Parse error: syntax error, unexpected 'h' (T_STRING), expecting ',' or ';' in C:\xampp\htdocs\app\tpl\skins\Habbo\topstats.php on line 156
<?php
$getTime = mysql_query("SELECT username,look,motto,online_time FROM users INNER JOIN users_settings ON users.id=users_settings.user_id WHERE users_settings.online_time AND users.rank < 5 ORDER BY users_settings.online_time");
$time = 3600*24; // 60*60*24
while($TimeStats = mysql_fetch_array($getTime)) {
echo '
<tr>
<td width="25%"><img src="http://www.habbo.com/habbo-imaging/avatarimage?figure=' . $TimeStats['look'] . '&size=m&direction32&head_direction=3&gesture=sml" align="left"></td>
<td width="75%"><a href="{url}/home/'.$TimeStats['username'].'"><b>'.$TimeStats['username'].'</b></a><br />' . date('h \h\o\u\r\s, i \m\i\n\u\t\e\s, s \s\e\c\o\n\d\s', $TimeStats['online_time']) . '</td>
</tr>';
}
?>
floor($seconds / 3600) . gmdate(":i:s", $seconds % 3600)