User Profile

Collapse

Profile Sidebar

Collapse
malc090350
malc090350
Last Activity: Apr 2 '10, 02:47 PM
Joined: Mar 6 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • malc090350
    replied to Assigning a value to a sql query
    in PHP
    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...
    See more | Go to post

    Leave a comment:


  • malc090350
    replied to Assigning a value to a sql query
    in PHP
    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...
    See more | Go to post

    Leave a comment:


  • malc090350
    started a topic Assigning a value to a sql query
    in PHP

    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.

    Code:
    <input type="hidden"	name="listing_number"	value="20161"	/>
    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...
    See more | Go to post

  • malc090350
    replied to Sql retrieve images from folder
    Thanks Alti

    But could you show me an exact example for my code above to show 2 columns
    See more | Go to post

    Leave a comment:


  • malc090350
    replied to Sql retrieve images from folder
    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/';
    ...
    See more | Go to post

    Leave a comment:


  • malc090350
    replied to Sql retrieve images from folder
    So how would this line be displayed?

    Code:
    echo "<img src="{$src}" alt="{$row['photo_caption_1']}" title="{$row['photo_caption_1']}"><br>";
    ...
    See more | Go to post
    Last edited by Atli; Mar 9 '10, 04:30 PM. Reason: Please use [code] tags for code, not [quote] tags!

    Leave a comment:


  • malc090350
    replied to Sql retrieve images from folder
    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...
    See more | Go to post
    Last edited by Atli; Mar 9 '10, 11:20 AM. Reason: Changed [quote] tags to [code] tags.

    Leave a comment:


  • malc090350
    replied to Sql retrieve images from folder
    Anyone help with this please, its driving me crazy
    See more | Go to post

    Leave a comment:


  • malc090350
    replied to Sql retrieve images from folder
    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...
    See more | Go to post

    Leave a comment:


  • malc090350
    started a topic Sql retrieve images from folder

    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)

    ...
    See more | Go to post
No activity results to display
Show More
Working...