Results 1 to 2 of 2

Thread: clever form

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Manchester
    Posts
    446

    clever form

    I'm tryin to create a form that allows null or *

    i have three instances

    dbname
    cust
    rel

    if all are * then list all, if dbname is star and others and values miss out dbname.. etc

    is there a clever way to build up the sql query instead of lots of iffs
    "Life isn't about finding yourself. Life is about creating yourself."
    --George Bernard Shaw

  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    Yes. I think. I'm not entirely sure exactly what you're asking but it sounds like you want to build a dynamic string to query the database based on some user input that is then submitted to the page (either by itself or another page). To that the answer is Yes. And you already guessed the method- Conditional structures like If..Then or Select..Case. You just have to decide what combinations generate what SQL code. Make sure you handle all possible combinations (or create a default scenario that executes if no other fits the bill)
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

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