
September 11th, 2003, 11:56 AM
|
|
Registered User
|
|
Join Date: Apr 2007
Posts: 22,309
Time spent in forums: < 1 sec
Reputation Power: 24
|
|
|
Retriving Data From MySQL
OK, my friend needs some help....this is what she says..............................................
My problem isn't selecting the rows. I have the row selected. I have the field selected. I just need to know how to search within that field for a particular character and/or word. IE, I have a mysql table named players with the fields playingID, playingName, and playingDescription. Within this table, there are x rows. I select the data by doing this:
"SELECT * FROM players WHERE playingName=$submitted_name"
$submitted_name is the name from the form that the player entered. THIS is the part where I have trouble. It'll select the right name if it's EXACT...but not if the submitted name matches only a PART of the playingName. IE: I enter "dutch" into the search because I want to find a player named dutch wb [but I don't remember the last part of the name]. Well, this won't work because there is no "dutch" in the database...there is only dutch wb.
basically, what she wants to do is let users search for other users but if they dont know the whole name, the search will bring back all the usernames that match whatever they type in.
Any help would be much appreciated, Email me at g_newbitt@hotmail.com
|