View Single Post
Old 26-03-2009, 09:06   #1
funkyCable
Inactive
 
Join Date: Aug 2005
Location: Canvey Island, Essex
Services: SERVICES FROM 26/08/05 TV XL services 2MB BROADBRAND UNLIMITED TALK PACKAGE V+ Service (Since 18
Posts: 1,195
funkyCable is just really nicefunkyCable is just really nicefunkyCable is just really nicefunkyCable is just really nicefunkyCable is just really nicefunkyCable is just really nice
PHP - Trying to retrieve a value from Mysql db

Hi

I have a table in mysql called tbl_picture_link which stores a url string to some pictures not I would like to retieve the string and place <img> around it.

This is the function I have
PHP Code:
function get_image($image_id){
    
//finds and displays the selected image 
        
global $connection
        
$query "SELECT     * 
                  FROM tbl_picture_link
                  where picture_link_id = 
{$image_id}  
                  LIMIT 1"

        
$picture_set mysql_query($query$connection); 
        
confirm_query($picture_set); 
        echo 
"<img scr=\"" $picture_set['picture_link_href'] . "\">" $query."<br />"
    } 
I'm not getting an errors with connection to my db all that its echoed is an img place holder the $query value which is a value sql statement because I copied the output and ran it in phpmyadmin and it returned some the result I was expecting.

Any ideas what could be wrong.
funkyCable is offline   Reply With Quote