Normalde oyunları yeni eklenneleri id ye gore sıralıyorum. Fakat be nkategori adlarınıda yanında yazdırmak istiyorum deneme yaptım ama olmadı.
Orjinal kod :
function get_most_yeni ($limit) {
global $table_games;
$sql = 'SELECT g_name,g_clean FROM '. $table_games .'
WHERE g_status = 1
ORDER BY g_id DESC
LIMIT '. $limit. '';
$result = do_mysql_query($sql);
// >> Test to see if there is something to show
if (mysql_num_rows($result)) {
// >> Go fetch
while($row = mysql_fetch_assoc($result)) {
echo '<li><a href="'. get_game_link($row['g_clean']) .'" class="anaplay">'. $row['g_name'] .'</a></li>';
}
}
else {
echo 'No Games Played Yet';
}
}
Benim düzenlediğim kod : php bilmememe rağmen![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
function get_most_yeni ($limit) {
global $table_games; $table_categories;
$sql = 'SELECT g.g_name,g.g_clean,g.g_iconname,g.g_date,g.g_desc,c.cat_name,c.cat_clean FROM '. $table_games .' g,'.$table_categories .' c
WHERE g.g_category = c.cat_id
AND g.g_status = 1
ORDER BY g.g_id DESC
LIMIT '. $limit. '';
$result = do_mysql_query($sql);
// >> Test to see if there is something to show
if (mysql_num_rows($result)) {
// >> Go fetch
while($row = mysql_fetch_assoc($result)) {
echo '<li>
<a href="'. get_game_link($row['cat_clean']) .'" class="anaplay">'. $row['cat_name'] .'</a>
<a href="'. get_game_link($row['g_clean']) .'" class="anaplay">'. $row['g_name'] .'</a></li>';
}
}
else {
echo 'asp bitti işin yoksa php ile uğraş';
}
}
ön izlemede : else txt im çıkıyor![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Orjinal kod :
function get_most_yeni ($limit) {
global $table_games;
$sql = 'SELECT g_name,g_clean FROM '. $table_games .'
WHERE g_status = 1
ORDER BY g_id DESC
LIMIT '. $limit. '';
$result = do_mysql_query($sql);
// >> Test to see if there is something to show
if (mysql_num_rows($result)) {
// >> Go fetch
while($row = mysql_fetch_assoc($result)) {
echo '<li><a href="'. get_game_link($row['g_clean']) .'" class="anaplay">'. $row['g_name'] .'</a></li>';
}
}
else {
echo 'No Games Played Yet';
}
}
Benim düzenlediğim kod : php bilmememe rağmen
function get_most_yeni ($limit) {
global $table_games; $table_categories;
$sql = 'SELECT g.g_name,g.g_clean,g.g_iconname,g.g_date,g.g_desc,c.cat_name,c.cat_clean FROM '. $table_games .' g,'.$table_categories .' c
WHERE g.g_category = c.cat_id
AND g.g_status = 1
ORDER BY g.g_id DESC
LIMIT '. $limit. '';
$result = do_mysql_query($sql);
// >> Test to see if there is something to show
if (mysql_num_rows($result)) {
// >> Go fetch
while($row = mysql_fetch_assoc($result)) {
echo '<li>
<a href="'. get_game_link($row['cat_clean']) .'" class="anaplay">'. $row['cat_name'] .'</a>
<a href="'. get_game_link($row['g_clean']) .'" class="anaplay">'. $row['g_name'] .'</a></li>';
}
}
else {
echo 'asp bitti işin yoksa php ile uğraş';
}
}
ön izlemede : else txt im çıkıyor