<table width="493">
<tr>
<td width="33" height="58">Rank</td>
<td width="203">Thumb</td>
<td width="203">Title</td>
<td width="57">Moyenne</td>
<td width="40">Votes </td>
<td width="30">Clics</td>
</tr>
<?php
# Don't allow direct linking
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_ConnFour = "XXX";
$database_ConnFour = "XXX";
$username_ConnFour = "XXX";
$password_ConnFour = "XXX";
$ConnFour = mysql_pconnect($hostname_ConnFour, $username_ConnFour, $password_ConnFour) or trigger_error(mysql_error(),E_USER_ERROR);
mysql_select_db('XXX');
$sql = 'SELECT g2_RatingCacheMap.g_itemId, g_title, ROUND((g_averageRating*2)/1000, 1) AS moyenne, g_voteCount, g_renderer, g_pathComponent, g_userName, g_viewCount
FROM g2_RatingCacheMap,g2_Item, g2_FileSystemEntity, g2_User, g2_ItemAttributesMap
WHERE g_canContainChildren = "0" AND g2_Item.g_id=g2_RatingCacheMap.g_itemId AND g_userName Not Like "admin" AND g2_RatingCacheMap.g_itemId=g2_ItemAttributesMap.g_itemId AND g_averageRating >3500
GROUP by g_itemId
ORDER by moyenne DESC, g_voteCount DESC, g_viewCount DESC
';
$req = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error());
while ($tableau= mysql_fetch_assoc($req))
{
echo '<tr><td>',$tableau['ranking'],'</td><td>',$tableau['g_pathComponent'],'</td><td>',$tableau['g_title'],'</td><td>',$tableau['moyenne'],'</td>
<td>',$tableau['g_voteCount'],'</td><td>',$tableau['g_viewCount'],'</td></tr> ';
}
?>
</table>
Posts: 28
No idea here?
Posts: 314
it's rather difficult to do it directly.
serbanc - www.e-poze.ro