MDanz Posted August 1, 2009 Share Posted August 1, 2009 Hello, I just want a brief understanding on how to do this. I have already done the upload image php and it works, they are stored in a mySQL database. Now how do i apply a search engine and the results(image) are displayed in a table, one image per cell? I want like a table slide show.. say 30 thumbnail images. I click the next button and the table repopulates with the 2nd page of 30 other thumbnail images... basically like google images. Just some help.. Link to comment https://forums.phpfreaks.com/topic/168359-image-search-engine-and-display/ Share on other sites More sharing options...
YourNameHere Posted August 1, 2009 Share Posted August 1, 2009 You would want to use a while loop to iterate over the images in your query. then you want to probubly learn pagination techniques. the while loop: <? $sql="SELECT * FROM images WHERE name LIKE...; $aResult=mysql_query($sql); $imgCount=mysql_num_rows($aResult); while ($t < $imgCount){ $name=mysql_result($aResult,$t,name); $image=mysql_result($aResult,$t,image); $desc=mysql_result($aResult,$t,desc); $title=mysql_result($aResult,$t,title); echo "<table> <tr><td>$title</td></tr> <tr><td>$image</td></tr> <tr><td>$image</td></tr> </table>"; $t++; } ?> Link to comment https://forums.phpfreaks.com/topic/168359-image-search-engine-and-display/#findComment-888119 Share on other sites More sharing options...
MDanz Posted August 1, 2009 Author Share Posted August 1, 2009 thx Link to comment https://forums.phpfreaks.com/topic/168359-image-search-engine-and-display/#findComment-888124 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.