searching problem

Results 1 to 3 of 3

Thread: searching problem

  1. #1
    Join Date
    Dec 1969

    Default searching problem

    so, here i go again today...<BR><BR>I have a page where a user can type in their name to see what projects they are assigned to. This worked great until i converted the names to numbers to do something else on the site. now, I need to still be able to do this. <BR><BR>i have two tables where my info is stored. one that holds all employee data, fname, lname, id, etc. and then another table that has the projects, with their id number listed on any given project. <BR><BR>so how should i go about this? Should i get the name and use the like function to find the name in the employee table, then grab that id and match it up in the other table or something else? Any help would be appreciated.

  2. #2
    Join Date
    Dec 1969

    Default Do you want

    other people to see other people&#039;s projects ?<BR>If I enter my co-worker&#039;s name in your &#060;textbox&#062; then I&#039;ll be able to see his/her projects, is that a big deal for you ?<BR><BR>Otherwise in order to view each project they have you should come up with an Identification system, like a login page where they enter their UserName and Password, then in a Session Variable you store the ID of that person, then they just have to click on a link that says "Show me my Projects" Using the ID stored in the Session variable you Query the database and there you go!<BR><BR><BR>If you don&#039;t/can&#039;t have the login approach the you&#039;ll have to use the LIKE keyword but that&#039;s when you start getting in problems...what if he/she types "Lind" the your recordset will find Linda, Lindo, Linds, Lindsay...and so on its your call but if you want to make this a more personal thing, then go with the login approach!

  3. #3
    wussy boy noodle Guest

    Default RE: searching problem

    sounds to me like you know what to do<BR><BR>the only suggestion i would have is that if you have a limited and reasonable number of users (like in an office setting, for example), you could just generate a dropdown of the users&#039; names, populated from the db, and have the value of the &#060;option&#062; tag be their user id - then when you do your search, you wouldn&#039;t have to use LIKE - just search by id<BR><BR>no chance for data entry error that way too

Posting Permissions

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