defeatlv Posted June 4, 2012 Share Posted June 4, 2012 Function member_sel($id, $value, $identi) { $other_sql = mysql_query("SELECT * FROM members WHERE ".$identi." = ".$id." "); $member = mysql_fetch_array($other_sql); echo $member[$value]; } member_sel($topic['author'], "username", 'id'); why it is not working ? Quote Link to comment https://forums.phpfreaks.com/topic/263630-function-member_select/ Share on other sites More sharing options...
trq Posted June 4, 2012 Share Posted June 4, 2012 Why not check and see for yourself? Your code has no error trapping at all. Quote Link to comment https://forums.phpfreaks.com/topic/263630-function-member_select/#findComment-1351067 Share on other sites More sharing options...
defeatlv Posted June 4, 2012 Author Share Posted June 4, 2012 Why not check and see for yourself? Your code has no error trapping at all. i have error reporting , but in the place where must be echo'ed the string there is nothing ! Quote Link to comment https://forums.phpfreaks.com/topic/263630-function-member_select/#findComment-1351073 Share on other sites More sharing options...
downah Posted June 4, 2012 Share Posted June 4, 2012 Function member_sel($id, $value, $identi) { $other_sql = mysql_query("SELECT * FROM members WHERE ".$identi." = ".$id." "); $member = mysql_fetch_array($other_sql); echo $member[$value]; } member_sel($topic['author'], "username", 'id'); why it is not working ? $other_sql = mysql_query("SELECT * FROM members WHERE ".$identi." = ".$id." ")or die(mysql_error()); Quote Link to comment https://forums.phpfreaks.com/topic/263630-function-member_select/#findComment-1351078 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.