aneeb Posted October 18, 2012 Share Posted October 18, 2012 Hey everyone! i am trying to fetch data from different file locations, every time there is a new location like this /5/3/539238_375049019231475_1212083119_n.jpg/3/0/309320_396625203733616_1897402511_n.jpg/n/i/nike.jpg I want to get data from all these locations in a single query, how do i get it? Please help me.. Link to comment Share on other sites More sharing options...
justsomeguy Posted October 18, 2012 Share Posted October 18, 2012 What do you mean a single query? Is a database involved? Link to comment Share on other sites More sharing options...
niche Posted October 18, 2012 Share Posted October 18, 2012 Please post your relevant code. Link to comment Share on other sites More sharing options...
aneeb Posted October 18, 2012 Author Share Posted October 18, 2012 Yes there is a datbase involved, these locations comes from a table. Link to comment Share on other sites More sharing options...
justsomeguy Posted October 18, 2012 Share Posted October 18, 2012 And you want one query to the database to return all of those filenames? Link to comment Share on other sites More sharing options...
JohnTipperton Posted October 19, 2012 Share Posted October 19, 2012 if you are trying to load it in a single query you should use while loop for it. while($row = mysql_fetch_array($result)) { echo '<img src="'.$path.'">'; echo "<br /></div>"; } Link to comment Share on other sites More sharing options...
kanchatchai Posted October 19, 2012 Share Posted October 19, 2012 <?PHP$dir="upload/"; $files = scandir($dir); foreach($files as $file) { echo $file."<br>"; }?> and do you mean scan file in dir agin. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now