How to search for several parameters from objects in a database?


Posted on 16th Feb 2014 07:03 pm by admin

I have a database with lots of information about objects.
Now I would like to search for 4 or 5 parameters at the same time (from a form) like this:

I choose from a select-box one parameter and then from another select-box (in the same form) another parameter.
Did you know?Explore Trending and Topic pages for more stories like this.
Now I want all the objects that fit in with all the chosen parameters to be shown.

I have tried this:
Code: $query = "SELECT * FROM vaxtlista WHERE farg='$farg' AND typ='$typ' ORDER BY vetenskapligt";
and this:
Code: $query = "SELECT * FROM vaxtlista WHERE (farg='$farg' AND typ='$typ') ORDER BY vetenskapligt";
I don´t use LIKE and jokers because I know exactly what´s in the fields.

Nothing works.

Someone who has a clue about this? Please help
No comments posted yet

Your Answer:

Login to answer
294 Like 6 Dislike
Previous forums Next forums
Other forums

Disabling SAP menu
How do I disable SAP menu for all the users and just restrict them to User Menu in SAP ECC 6.0?

[PHP HELP] Php order form.
Hello to everyone @ phpfreaks. Im new to this site and hope to learn lots of things here.

Fir

Combining Two Queries
I have two scripts that each work fine by themselves. One is a search script with a variable that de

Inserting a check in checkbox from array value
Hello all,
I have a bit of code that works for a select option box, but does not work for my chec

How to schedule the a job?
Hi,
I have prepared a task ( i.e. a procedure is prepare the file and send the same to con

First root of a number
Hi,

I can't find any function in php to give me the first root of a number.
Is there any

how to get different value in second view of webdynpro?
hello guys,

In ABAP webdynpro I am trying to create one application having two views.

Production Order Enterprise Service to Manufacturing Exctn Sys (MES) ???
Hello Experts,

In our current landscape SAP ECC 5.0 is integrated to MES system via PI 7.

Casting Decimals in Oracle
This code worked as a query in DB2, but I am not sure what the syntax is for casting decimals in Ora

How to separate records and ORDER BY
Let say i have 100 records and displayed in one page, then i want to get the records from 50-100 and

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash