Jump to content

Searching


Recommended Posts

I have a MySql database where I have a seperate field for each program \"Quark, Pagemaker, Photoshop, ect\" that may be on a certain computer. The value for each field is either Yes or No. Meaning yes its installed on the computer or No its not.

 

I want to create a page with a pull down list where I select the program leys say \"quark\" and it would bring me to a detail page listing all the computers that have Quark installed \"Yes\"

I understand how to do this if I was checking one field for yes or no , but because i have numerous fields i cand seem to come up with the code to do this.

 

Is there anyone out there who can help?

Link to comment
Share on other sites

I am stuck on this project and cannot go any further without your help.

Let me explain it again.

I have appx 20 fileds named after programs which may be installed on a computer.

The fiels can contan either yes or no.

 

I want to creat a page with a puldown list where you select the program you want to use and it will goto a page that will display a list of computers tha t have this program installed.

 

This would be find if I had only one field to searcd but I have appx 20 fields. it has to first find the program field and see if a yes is in that field. I dont know how to code it to look for that field only to see if it contains a yes.

 

Please I am at a standstill without this.

I have included the list of fields below.

 

Field Type Null Default Links to Comments

Device varchar(30) No

Description varchar(120) No 0

Network_Name varchar(30) No

Location varchar(30) No

ip varchar(15) No 0

Can_Ping char(2) No

Drop varchar(4) No

Operating_Sys varchar(40) Yes NULL

quark50 varchar(5) No No

pic varchar(100) No nophoto.gif

quark41 varchar(5) No No

pm65 varchar(5) No

pm70 varchar(5) No No

quark60 varchar(5) No No

ps60 varchar(5) No No

ps70 varchar(5) No No

ps80 varchar(5) No No

ps90 varchar(5) No No

ps10 varchar(5) No No

pscs varchar(5) No No

ill9 varchar(5) No No

ill10 varchar(5) No No

corel10 varchar(5) No No

corel11 varchar(5) No No

wordperfect varchar(5) No No

publisher2000 varchar(5) No No

indesign1 varchar(5) No No

indesign2 varchar(5) No No

Link to comment
Share on other sites

On the page with the pull down list I have to setup a variable.

When I select the value from the pull down list it gets assigned to the variable also.

 

The search query should look something like this I think..

 

Select ($Variable)

From lab

Where ($Variable) = yes

 

This is what I think the query should be like but I dont know how to write the real code...CAN you help.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.