Results 1 to 7 of 7

Thread: Design Question

  1. #1
    Join Date
    Mar 2007
    Location
    010101010110100
    Posts
    803

    Unanswered: Design Question

    Hi all,

    I am using php to design a front end to a mysql database. I have run into a design issue that I really don't know how to tackle. Hopefully I am posting to the right forum, my appoligizes if not.

    I have one form that populates from about three different tables. Some of the data that will be displayed on the form will have many repeating types of entries. An example is user data. Name, address city etc...

    If my db has 100 users, and the db user needs to look up a user but does not have their name I think that is pretty useless.

    What I currently have is data being populated to a dropdown box and the user can then select from there but I don't like it too much. There has to be a better way to handle this.

    I would like to know what the best way would be to display this data. What I do not want is for 100 rows of user data to populate the form. I know I could use LIMIT but my design won't allow for additional pages. These pages are sub tabs off of a main navigation bar.


    If anyone can maybe offer some pointers, I would be grateful.

    Thanks,

    Frank

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    for the sort of thing you are talking about hen it may make sense to consider using an AJAX approach.

    you can't fully populate a web drop down box with all the names that mught exists in the app. (there could be hundreds./thousands or whatever). granted it works with very few names).

    you could have a list box say with A-Z.. user selcts that, then retrieve the specific letter, then gradually drill down.

    however I think a better solution will be using AJAX. get say the first 3..4 letters of the users input.. then send an AJAX request to the server and populate the list box appropriately.

    bearing in mind that you are searching for a users specified name.. it may make sense to use a phonetic search algolrythm.... something based on the Soundex or double metanym..... There is an inbuilt soundex function in MySQL, but Ive no idea how appropriate it is for your use. The early Soundex functions are fine for the English Language.. but can have serious problems with other language, or in a mixed language. So you may have a problem if you use Spanish and English names, and you haven't a hope if you have Welsh names
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Mar 2007
    Location
    010101010110100
    Posts
    803
    Healdem,

    Thanks for the reply. I agree with you that the dropdown is a bad idea. I actually have an AJAX solution that provides the user with autocompletion upon typing just a few letters, but the problem again is that the ui operatior is going to have to know the persons name first.

    In my situation, the ui user may need to search for an "Employee" or maybe a "Manager". The only thing I can come up with is to either place the AJAX textbox, which really isn't going to help, or use your suggestion with the letters or maybe allow searches by job title. Arggg..

    BTW: Thank you for the soundex links.

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    frank, you know me, right?

    okay, my username is registered in a database, let's call it database X, but my username is ~not~ r937 in this database

    this database has a front end application which allows you to search for my username

    please explain how you would search for me
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Mar 2007
    Location
    010101010110100
    Posts
    803
    Quote Originally Posted by r937
    frank, you know me, right?

    okay, my username is registered in a database, let's call it database X, but my username is ~not~ r937 in this database

    this database has a front end application which allows you to search for my username

    please explain how you would search for me
    Hey Rudy, Of course I know you. Thanks for the reply..

    I see what you are getting at and have been struggling with this very issue but I can't figure out how to solve it..

    I thought about what Healdem said about the list box with A-Z then drill down from there but that still doesn't solve how we would find Rudy if he were not known in db "X" as r937. For that matter, if the user didn't even know what your name was they couldn't find you. Your scratching your head, I know.. Let me explain.

    The list of users in this db is a group of employees that are not known to the system user. The system user will, on occasion, need to contact someone from that list. These people are known as "Responsible persons" and need to be called on occasion. There is also another time when that person would need to be looked up and would be when that user or their manager calls to update their info. The latter doesn't bother me much because the system user will have their name then.

    If a responsible person needed to be contacted and there were say, 40 or so people in the db, I could have php populate the form with all of that data but it would then ruin my pretty design. I just don't want to clutter the form.

  6. #6
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    i'm glad you figured out that one cannot search for something if one does not know what to search for

    but more importantly, there's no way that a dropdown can ruin a design

    i think you're trying to fix the wrong problem
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  7. #7
    Join Date
    Mar 2007
    Location
    010101010110100
    Posts
    803
    Quote Originally Posted by r937
    i think you're trying to fix the wrong problem
    Thanks Rudy.. That link really puts things into prospective..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •