Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 04-11-2005, 05:11 PM im trying
Skilled Talker

Posts: 52
Trades: 0
to find the code that will let me add a user search option onto this little site that i have made, does anyone know of or have a code that will let me do this as i have been looking everywhere and even tried to write it myself but as of yet i have not had any luck lol
lee-buck-9-uk is offline
Reply With Quote
View Public Profile Visit lee-buck-9-uk's homepage!
 
 
Register now for full access!
Old 04-11-2005, 05:39 PM
leavethisplace's Avatar
Ultra Talker

Posts: 297
Trades: 0
depends how your users are stored (mySQL databade, flatfile database, file system) and how exactly you want to search for them.

If it's SQL then we'll be able to help you much more easily
__________________
A lie gets halfway around the world before the truth has a chance to get its pants on. - Sir Winston Churchill

Please visit my sites:
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
leavethisplace is offline
Reply With Quote
View Public Profile
 
Old 04-11-2005, 07:06 PM
Skilled Talker

Posts: 52
Trades: 0
my database is in mysql and the users are stored in user id number
lee-buck-9-uk is offline
Reply With Quote
View Public Profile Visit lee-buck-9-uk's homepage!
 
Old 04-11-2005, 08:58 PM
0beron's Avatar
Defies a Status

Posts: 1,832
Location: Somewhere else entirely
Trades: 0
So if someone were to search would they have to know the id number or do you want them to be able to enter part of a username and search for that?
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';

Please login or register to view this content. Registration is FREE
(aka MSN handwriting for forums)
0beron is offline
Reply With Quote
View Public Profile Visit 0beron's homepage!
 
Old 04-12-2005, 07:23 AM
leavethisplace's Avatar
Ultra Talker

Posts: 297
Trades: 0
The reason Oberon and I are asking is because we have just finished helping a dude search his database for users beginning with a certain letter, which can be found here

Read this post from top to bottom. It will give you a good idea how WHERE cell LIKE "criteria" works, and how to use the % wildcard.

Post back if you got any problems (not the emotional or mental ones)
__________________
A lie gets halfway around the world before the truth has a chance to get its pants on. - Sir Winston Churchill

Please visit my sites:
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
leavethisplace is offline
Reply With Quote
View Public Profile
 
Old 04-12-2005, 08:41 AM
0beron's Avatar
Defies a Status

Posts: 1,832
Location: Somewhere else entirely
Trades: 0
Using like, you can search your usernames for fragments of text by using the pattern "%fragment%" in your MYSQL LIKE clause. So "%Fred%" will match "Fred" but also "Frederick" "Frederica" "Freda" and also "MynameisFred". It's case insensitive AFAIK so it would also find fred and fReD. Not entirely certain since I haven't used this much.
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';

Please login or register to view this content. Registration is FREE
(aka MSN handwriting for forums)
0beron is offline
Reply With Quote
View Public Profile Visit 0beron's homepage!
 
Old 04-12-2005, 09:51 AM
KML9870's Avatar
One Bad Mamma :-)

Posts: 5,489
Name: Kandi
Location: Western NY
Trades: 0
I know that like is case insensitive & I believe it is the only way to search with out it being case sensitive in MYSQL. I tend to use like frequently and = much less because of the narrowness of the search results.
KML9870 is offline
Reply With Quote
View Public Profile
 
Old 04-12-2005, 11:21 AM
Skilled Talker

Posts: 52
Trades: 0
i had a look at the code and none of it make any sense to me
lee-buck-9-uk is offline
Reply With Quote
View Public Profile Visit lee-buck-9-uk's homepage!
 
Reply     « Reply to im trying
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.36548 seconds with 12 queries