Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old September 11th, 2003, 11:56 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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

Reply With Quote
  #2  
Old September 11th, 2003, 12:26 PM
Matt Matt is offline
Contributing User
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
RE: Retriving Data From MySQL

"SELECT * FROM players WHERE playingName LIKE '%$submitted_name%'"


Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > Retriving Data From MySQL


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT