spenceddd Posted January 29, 2010 Share Posted January 29, 2010 Hello, I can't seem to get this request to work, I have looked around for an answer but I asm new to php and cannot get my head around it. $query_relatedItems = "SELECT img01 FROM PortfolioItems WHERE id=103"; $relatedItemResult = mysql_query($query_relatedItems, $dbc) or die(mysql_error()); echo $relatedItemResult['img01']; Any help appreciated! Thanks Spencer Link to comment https://forums.phpfreaks.com/topic/190251-could-somebody-please-help-me-with-mysql-request/ Share on other sites More sharing options...
taquitosensei Posted January 29, 2010 Share Posted January 29, 2010 you're missing a step $query_relatedItems = "SELECT img01 FROM PortfolioItems WHERE id=103"; $result = mysql_query($query_relatedItems, $dbc) or die(mysql_error()); $relatedItemResults=mysql_fetch_assoc($result); $relatedItemResult=$relatedItemResult[0]; echo $relatedItemResult['img01']; Link to comment https://forums.phpfreaks.com/topic/190251-could-somebody-please-help-me-with-mysql-request/#findComment-1003759 Share on other sites More sharing options...
spenceddd Posted January 29, 2010 Author Share Posted January 29, 2010 Ah! got it! Thanks a million! Link to comment https://forums.phpfreaks.com/topic/190251-could-somebody-please-help-me-with-mysql-request/#findComment-1003760 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.