Johnnnnny1986 Posted October 30, 2006 Share Posted October 30, 2006 Im having probs gettin a link for a picture from my database to shoow the picture.Ithought the coding whould be:[code] $sqlthing = mysql_query("SELECT * FROM members WHERE username='$username'"); $pic=(mysql_result($sqlthing,0,"pic"));if($pic>0){ $sqlthing = mysql_query("SELECT * FROM profile WHERE username='$username'"); $piclink=(mysql_result($sqlthing,0,"piclink"));?><img src="$piclink" alt="My Pic"/><br/><?php}[/code]But that didnt work. Quote Link to comment https://forums.phpfreaks.com/topic/25570-problems-with-image/ Share on other sites More sharing options...
HuggieBear Posted October 30, 2006 Share Posted October 30, 2006 I'm assuming from the code that the column 'pic' in the 'members' table contains either a 1 or a 0 depending on if they have a picture on their profile and the 'piclink' column in the 'profile' table, just contains the location of the image, e.g. http://mydomain.com/image.jpgIs this correct?Also, does every member have a row in the 'profile' table?RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/25570-problems-with-image/#findComment-116681 Share on other sites More sharing options...
Johnnnnny1986 Posted October 30, 2006 Author Share Posted October 30, 2006 [quote author=HuggieBear link=topic=113214.msg459910#msg459910 date=1162209410]I'm assuming from the code that the column 'pic' in the 'members' table contains either a 1 or a 0 depending on if they have a picture on their profile and the 'piclink' column in the 'profile' table, just contains the location of the image, e.g. http://mydomain.com/image.jpgIs this correct?Also, does every member have a row in the 'profile' table?RegardsHuggie[/quote]Yes to all :) Quote Link to comment https://forums.phpfreaks.com/topic/25570-problems-with-image/#findComment-116682 Share on other sites More sharing options...
Johnnnnny1986 Posted October 30, 2006 Author Share Posted October 30, 2006 Anyone got any ideas? Please :-\ Quote Link to comment https://forums.phpfreaks.com/topic/25570-problems-with-image/#findComment-116792 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.