Hi Atli
Sometimes im not sure of the terminology.
Yes, the number is in the database and corresponds with a curtain property details such as prices, pictures, description etc. It is unique for each property. It is constant thruout all the tables.
So when a certain property page is opened, all the relevant details are shown for that property number on the webpage.
So the unique number is what im...
User Profile
Collapse
-
Sorry, Im not submitting a form
I am trying to pull photos from a db
The 20161 number is unique to each property page and its the only thing I can see on the page with the unique number on.
I am trying to get the pictures from the db on the property page template. So if I add this...
and the rest of the php code thats working. How do I tell the "WHERE phot_listing =" to...Leave a comment:
-
Assigning a value to a sql query
I have a cms site and all the main pages are driven from a template.
Each different property page picks up the unique property id number, like below.
If I use this sql command how do I change the part "127" for the "value=" above, so it connects with the correct property id in the database? Do...Code:<input type="hidden" name="listing_number" value="20161" />
-
Thanks Alti
But could you show me an exact example for my code above to show 2 columnsLeave a comment:
-
I have got this far and it displays the images in 1 column...
...Code:// Connect to server and select database. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); // Location where the images are stored $file_path = 'http://www.mysite.com/holidays/files/photo_big/';Leave a comment:
-
So how would this line be displayed?
...Code:echo "<img src="{$src}" alt="{$row['photo_caption_1']}" title="{$row['photo_caption_1']}"><br>";Last edited by Atli; Mar 9 '10, 04:30 PM. Reason: Please use [code] tags for code, not [quote] tags!Leave a comment:
-
I have the code below but I am getting the following error...
Line 38 is the one in bold...
<Line #21 in the snippet --Atli>
[code=php]// Connect to server and select database.
mysql_connect(" $host", "$username" , "$password" )or die("cannot connect");
mysql_select_db ("$db_name") or die("cannot select DB");
// Location...Leave a comment:
-
-
Hi Atli
Thanks for your help, really appreciate it!
I have attached a view of the database that accesses the pictures.
This is for a single property 127, to give you an idea.
The pictures are in folder
/holidays/files/photo_big
How would I implement this in your code exactly?
I would like the pictures to display...
Pic1 Pic2
Pic3 Pic4...Leave a comment:
-
Sql retrieve images from folder
Hi, new here
Wonder if anyone can help
I am learning sql and have searched for the answer for over a day, with no luck. I found this site and it seems you all help each other.
I have a database called "listing_ph oto"
In that there is row "photo_list ing" (unique property number)
& row "photo_capt ion" (holds the caption for the photo)
...
No activity results to display
Show More
Leave a comment: