Jump to content

NoyHadar

New Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by NoyHadar

  1. This did the trick; ('../imgs/homes/' . $mls . '_??.jpg') vs. ('../imgs/homes/' . $mls . '_*_tn.jpg') Thanks for all your help Noy Hadar
  2. This worked like a charm, thank you so much!!! One last question, I use this code to retrieve the thumbnails; ('../imgs/homes/' . $mls . '_*_tn.jpg') ie. A1736620_01_tn.jpg But when trying to retrieve the original image, I get both; ('../imgs/homes/' . $mls . '_*.jpg') ie. A1736620_01.jpg A1736620_01_tn.jpg How can I use the wildcard char to isolate just the original image?
  3. I do not have a need to keep the name of the file in the db for the following reason, if a row (db entry) has an ID value of 'q123456', then I have it's associated images named; q123456-1.jpg, q123456-1_tn.jpg, q123456-2.jpg, q123456-2_tn.jpg, etc, all in the same directory. So if this particular listing has 16 images I would manually have to enter that value in the db as PIX=16 I would like to know if I can avoid that step, and somehow import all the images that begin with 'q123456', without the designation of how many images to check for.
  4. Here it is. Thanks! $_ID = $_GET[ 'ID' ]; $query = " SELECT * FROM listings AND MLS='. $_ID .' " ); $result = $con->query($query) or die($con->error.__LINE__); $row = $result->fetch_assoc();
  5. My first post. I am trying to import images related to a particular listing ID. Currently, I have to enter the number of available photos into a db table, and run the following loop; <section id="photos"> <?php $b = $row['PIX']; for ( $a = 01; $a <= $b; $a++ ) { echo "<a href=\"../imgs/{ $row[ 'ID' ] }-" . { $a } . ".jpg\" ><img src=\"../imgs/{ $row[ 'ID' ] }-" . { $a } . "_tn.jpg\" /></a> " ; } ?> </section> I would like to find a way to import all the images that begin with the $row[ 'ID' ], but without me having to enter/store { $b } (the number of images recorded in the db). How can I accomplish this? _
×
×
  • 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.