Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Feb 8th, 2005, 3:32 AM   #1
scorpiosage
Programmer
 
scorpiosage's Avatar
 
Join Date: Aug 2004
Location: Austin, Tx
Posts: 55
Rep Power: 5 scorpiosage is on a distinguished road
Send a message via AIM to scorpiosage Send a message via Yahoo to scorpiosage
MYSQL, pipe delimited or just spaces?

One of my projects is going to require a search.
I have members who have and use multiple names. Some of these names use spaces or hyphens, and I believe some may use commas.

my issue is that, i have no controll over these user names, as the way that it is designed is so that they match the names that they use on a different site, wich has no rules set as to their structure.

they may have the following names
kitty cat
cat
kittycat

so, how I would like for this to work is that their is one field where these names are entered, and that these names can be updated as well.

when I search, it would search these fields, first by the exact phrase put in the search field and then, by the word appearing somewhere within the name.

So if someone typed CAT in the search field, it would return, all three results and it would sort them to this order
cat
kitty cat
kittycat

My question is, in what way should I structure these fields? I was thinking that, since rarely would one use the pipe | key for their username, I could tack that on. so the field would read like this

cat|Kittycat|kitty cat

I would want to make sure that when they are entering their names into their personal profile, that whitespace that follows the name, in case they accidently hit the space bar, or copy it from somewhere that tacks on whitespace, is not inserted, so we don't get something like cat |kittycat

I know how to make sure to tack on the | when they are updating their profile, but, how do you, make it so that it searches each record keeping in mind the pipe. And then, how do you make sure to take the pipe out when posting the response to the query.

Am I thinking about this too hard? Since I have unlimited databases on my server, do you think it would be better if I just had a table for this purpouse and connected it based on a server generated index number?

What do you think?
Thanks in advance
Mike
__________________
Here's my latest project still in the works, and I need to get rid of this "frame" situation for real. www.prideofaustin.com
scorpiosage is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:14 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC