Jump to content

question about ORDER BY


corillo181

Recommended Posts

i got this query tha tit supposed to take the last id and bring out the path and display the pic..

it was wokring fine until i put more than 10 id.. after the 10 id it stays in the id number 10 showing the picture the id that belong sto id number 10..


[code]
        <?
// getting last picture inserted in to the album and linking it to the album
$get2=mysql_query("SELECT path FROM photo_thumbs WHERE album_id='".$al['album_id']."' ORDER BY photo_id DESC LIMIT 1")or die(mysql_error());
$fet=mysql_fetch_array($get2);
?>
<a href="<?=$_SERVER['PHP_SELF']?>?a=<?=$al['album_id']?>"><img src="<?=$fet['path']?>"></a>
[/code]
Link to comment
https://forums.phpfreaks.com/topic/34662-question-about-order-by/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.