eightlegs Posted June 29, 2011 Share Posted June 29, 2011 hello to all I apologize for my bad english purpose registers to take away my doubts! How can I get a name in a field expecific in mysql table? For example: I have several nick names in the field, but I wish it were just picking a name expecific field nick (test) I have this in my code $ queryget = mysql_query ("SELECT * FROM some_table WHERE nick LIKE 'test%'") or die ("error queryget"); so it will get what is called test and shows all the lines of it! the question is, how can I make it go get the name of members logged in page? with -> session_start (); if ($ _SESSION ['username']) how do I enter the $ _SESSION ['username'] selection of the query? Will it? $ queryget = mysql_query ("SELECT * FROM some_table WHERE nick LIKE '$ _SESSION [' username']%'") or die (" error queryget "); but the error in the query, I need help! sorry if not posted in the right place my doubts, but it is the first time you put something on a forum! Quote Link to comment https://forums.phpfreaks.com/topic/240707-help-queryget/ Share on other sites More sharing options...
TeNDoLLA Posted June 29, 2011 Share Posted June 29, 2011 $username = $_SESSION['username']; $queryget = mysql_query("SELECT * FROM some_table WHERE nick LIKE '$username%'") or die ('error queryget'); Quote Link to comment https://forums.phpfreaks.com/topic/240707-help-queryget/#findComment-1236348 Share on other sites More sharing options...
eightlegs Posted June 29, 2011 Author Share Posted June 29, 2011 wowwwwww test and is running at 100% thank you so much, I owe you one! thanks friend Quote Link to comment https://forums.phpfreaks.com/topic/240707-help-queryget/#findComment-1236362 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.