Jump to content

Help queryget!


eightlegs

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/240707-help-queryget/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.