Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Passing "All" from a form to SQL

New Here ,
Jan 22, 2007 Jan 22, 2007
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?
TOPICS
Server side applications
218
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 22, 2007 Jan 22, 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?
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 23, 2007 Jan 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 23, 2007 Jan 23, 2007
LATEST
An = in a SQL expression requires an exact match, and can not be used with a
wildcard. You would need to change it to LIKE for this coming from the
dropdowns where you want to test all.

--
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:ep5b06$2qj$1@forums.macromedia.com...
>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
>
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines