Results 1 to 2 of 2

Thread: Displaying only those Records User can see

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    1

    Post

    My problem.

    Making a web page to display MS-Access 97 data.

    I want to creat a (e.g.) a user Input Box on the web page. The user will enter thier UserID and the database will only return those entries that match the UserID.

    There are over 60 seperate UserID's. I could make some 60 Case statements to run a SQL * from ... statements. But what I think I can do is something like this.

    input type="text" (etc.)

    SQL Select from Table WHERE text = text
    (a LIKE statement would be used I am guessing)

    So, they enter the text in the input box, than SUBMIT it and the Database will only return those matching records that are Equal to what the "Text" was.

    Say text was UserID, UserID in a field on my database, display only those records that Match the UserID, not the entire database.

    How do I do this???
    Any help is most apprecitated.

  2. #2
    Addicted Member pardede's Avatar
    Join Date
    Jan 2000
    Posts
    232

    Post

    use "LIKE" instead of "=" in the WHERE clause of your SQL:

    SELECT field FROM Table WHERE text LIKE "text*"

Posting Permissions

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



Click Here to Expand Forum to Full Width