dmccabe Posted June 12, 2008 Share Posted June 12, 2008 I am having a memory blank moment. I am running this query $editnewusers_qry = "SELECT * FROM `tbl_newsusers` WHERE `nuid` = '$nuid' ORDER BY nuid ASC"; $editnewusers_result = mysql_query($editnewusers_qry); $first_name = $editnewusers_result['first_name']; Works fine apart from the setting a value for $first_name which doesnt contain a value, but should Where am I going wrong now? Link to comment https://forums.phpfreaks.com/topic/109872-solved-brain-fart-please-help/ Share on other sites More sharing options...
conker87 Posted June 12, 2008 Share Posted June 12, 2008 That's because you've not put it in an array, that's just running the query not getting any results. Use mysql_fetch_array or mysql_fetch_row Link to comment https://forums.phpfreaks.com/topic/109872-solved-brain-fart-please-help/#findComment-563781 Share on other sites More sharing options...
dmccabe Posted June 12, 2008 Author Share Posted June 12, 2008 sorry you lost me? Link to comment https://forums.phpfreaks.com/topic/109872-solved-brain-fart-please-help/#findComment-563784 Share on other sites More sharing options...
kenrbnsn Posted June 12, 2008 Share Posted June 12, 2008 You have to use one of the mysql fetch functions to get the actual data. <?php $editnewusers_qry = "SELECT * FROM `tbl_newsusers` WHERE `nuid` = '$nuid' ORDER BY nuid ASC"; $editnewusers_result = mysql_query($editnewusers_qry); $editnewusers_row = mysql_fetch_assoc($editnewusers_result); $first_name = $editnewusers_row['first_name']; ?> Ken Link to comment https://forums.phpfreaks.com/topic/109872-solved-brain-fart-please-help/#findComment-563787 Share on other sites More sharing options...
dmccabe Posted June 12, 2008 Author Share Posted June 12, 2008 ah ha! thank you both kindly! p.s. compliments to this forum as well, I have always received friendly courteous advice rather than people calling me a nublett Link to comment https://forums.phpfreaks.com/topic/109872-solved-brain-fart-please-help/#findComment-563790 Share on other sites More sharing options...
conker87 Posted June 12, 2008 Share Posted June 12, 2008 Most other forums are populated by 13 year old kids waring about which console will give them bigger and better graphics. At PHPFreaks we take kindly on the beginners. And teach them the ancient* art of PHP. (*note: PHP may not be ancient) Link to comment https://forums.phpfreaks.com/topic/109872-solved-brain-fart-please-help/#findComment-563799 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.