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. 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 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 :) 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 :-\ Link to comment https://forums.phpfreaks.com/topic/25570-problems-with-image/#findComment-116792 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.