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 Quote 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']; Quote 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! Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.