Skip to main content
January 22, 2007
Question

Passing "All" from a form to SQL

  • January 22, 2007
  • 1 reply
  • 241 views
I have a form with 2 drop down boxes. It lets you search for employees. One searches on title, the other searches on office. I can choose "secretary" in "philadelphia" and it works just fine. I can't figure out how to get it to search for "everyone" in the "Phila" office.

How do I pass an everyone variable from a form?
This topic has been closed for replies.

1 reply

Inspiring
January 23, 2007
Providing you are using LIKE tests in the SQL statement the you could define
a "Select All" option in the dropdown with a value of %

--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver

Valleybiz Internet Design
www.valleybiz.net

"webgirljudi_s" <webforumsuser@macromedia.com> wrote in message
news:ep2jvj$jvt$1@forums.macromedia.com...
>I have a form with 2 drop down boxes. It lets you search for employees.
>One
> searches on title, the other searches on office. I can choose "secretary"
> in
> "philadelphia" and it works just fine. I can't figure out how to get it
> to
> search for "everyone" in the "Phila" office.
>
> How do I pass an everyone variable from a form?
>


January 23, 2007
I tried that and I get no results. Here is my query:

SELECT Office, Office2, Floor, LastName, FirstName, MI, Ext1, Ext2, DirectDial, DirectFax, CellPhone, HomePhone, Initials, AsstExtension, Pager, ThumbnailPhoto, BioPage, AsstName, Asst2Name, Asst2Extension
FROM Employees
WHERE Active = 'Y' AND (Office = strOffice OR Office2 = strOffice2) AND (Title = strTitle OR Title2 = strTitle2)
ORDER BY LastName ASC, FirstName ASC