How to do a search with multiple criteria

Hello

I have a table containing information on the staff. (name, position Dept., post, e-mail,... etc.)

I created a search page that allows the user to search any field. The result should appear in the same page

first of all, I created the form:

Enter the staff name:

Enter the Department:

Select position:

submit button

Then I created the recordset that select all the fields in the table, now I need a help in the criteria, that's what I used:

SELECT *.
OF tblstaff
WHERE the first name AS column name % AND Dept = coldept

for the column name and coldept

default = 1

running value = $HTTP_POST_VARS ["FirstName"] - $HTTP_POST_VARS ['category']

It seems to work fine when I enter all the values in the search form. But what happens if I left some fields empty? In other words how to add (all down to the low menu and accept an empty value for text search)?

can someone help me?

The easiest way to do this is to add a wildcard character at the end of coldept and to make the optional field.

SELECT *
FROM tblstaff
WHERE First_Name LIKE %colname% AND Dept LIKE coldept%

If the service field is empty, it corresponds to all departments.

Furthermore, you should not use $HTTP_POST_VARS or $HTTP_GET_VARS. It of deprecated code and will break on a modern installation of PHP. Use $_POST and $_GET.

Tags: Dreamweaver

Similar Questions

  • How to configure a VM with multiple network cards to see Agent?

    How to configure a VM with multiple network cards to see Agent?

    We can archive this requirement by configuring the subnet used view Agent.

    The subnet determines which view address of Network Agent provides the server instance to connect to view for the client protocol connections. The view on VM officer has more than one NIC

    Follow the procedure below:

    on a display Agent installed VM,

    * Recording of VM session.

    * RUN--> type regedit or type regedit.exe at the command prompt

    * Create a registry entry to configure the subnet.

    For example: is HKLM\Software\VMware, Inc. \VMware VDM\Node Manager\subnet = n.n.n.n/m type - REG_SZ.

    In this example, n.n.n.n is the TCP/IP subnet, and m is the number of bits in the subnet mask.

  • How to share the library with multiple users?

    I have a Mac Pro 2008.  I have four internal hard drives.  One of them is an SSD that is my boot drive.  I have another internal drive that houses my music and movies (2 TB).

    I have four different connections - mine (admin), my wife, my son, my daughter.

    How can I share music on (2 TB) library with other users?  I read to the music folder (shared) - however since the 2 TB is not a boot disc, there is no shared folder.

    You try to share an iTunes library, or the drive contains just music files.

    Other users can see the drive, or simply don't have access to the records.

  • How to do a search with the value of the results being a hyperlink?

    Hi all

    I I created two tables, the table, one is a short version of the table 2 with the options from the drop-down list so that only the information you want are pulled up. so all my search formulas work to pre fill the columns following except where I'm doing the shoot hyperlinks table two as the results (values). I do what I've done for all the other search values (search for) (search - where) (results values) but I either get a sign of error or I get an empty cell. According to all other forms of research simply do not hyperlinks as results-values work... Please help. Thanks to anyone in advance!

    the LIEN_HYPERTEXTE function in numbers is described as follows:

    The LIEN_HYPERTEXTE function creates a clickable link that opens a Web page or a new e-mail message.

    • Hyperlink (url, link-text)
      • URL: a standard universal resource locator. URL is a string value which must contain a string correctly formatted Universal Resource Locator.
      • text link: an optional string value that specifies the text that appears as a clickable link in the cell. If the link text is omitted, the url is used as link text.

    As you can see, you can reference a page web (the URL may have on your local file system) or e-mail.  Maybe post an example of what you have will help us help you

  • How to retrieve unique records with multiple columns

    I have a sps_prod table as described below-

    POGNAME VARCHAR2 (1500)
    INDEX #VERSION VARCHAR2 (200)
    POG_MODEL_STATUS VARCHAR2 (100)
    POG_LAYOUT_TYPE VARCHAR2 (500)
    POG_MARKET_SPECIFIC VARCHAR2 (500)
    POG_CONTACT_NUMBER VARCHAR2 (100)
    AREA_SUPPORTED VARCHAR2 (500)
    POG_COMMENTS VARCHAR2 (1500)
    POG_FOOTER_COMMENTS VARCHAR2 (1500)
    POG_ELECTRICAL_LIST_1 VARCHAR2 (1500)
    POG_ELECTRICAL_LIST_2 VARCHAR2 (1500)
    POG_CARPENTRY_1 VARCHAR2 (1500)
    POG_CARPENTRY_2 VARCHAR2 (1500)
    INSTALLATION_INSTRUCTION_1 VARCHAR2 (1500)
    INSTALLATION_INSTRUCTION_2 VARCHAR2 (1500)
    FIXTURE_REORDER_NUMBER VARCHAR2 (200)
    FIXTURE_ID VARCHAR2 (200)
    FIXTURE_NAME VARCHAR2 (500)
    FIXTURE_IMAGE VARCHAR2 (500)
    PART_REORDER_NUMBER_9 VARCHAR2 (500)
    PART_FIXTURE_ID_9 VARCHAR2 (500)
    PART_FIXTURE_NAME_9 VARCHAR2 (500)
    PART_FIXTURE_IMAGE_9 VARCHAR2 (500)
    UPC VARCHAR2 (50)
    ITEM_NUMBER VARCHAR2 (50)
    DESCRIPTION VARCHAR2 (700)
    MERCH_TYPE VARCHAR2 (20)
    HEIGHT VARCHAR2 (100)
    WIDTH VARCHAR2 (100)
    DEPTH VARCHAR2 (100)
    DATE OF CREATE_TS

    There are 4 million records in it and many with the same combination of POGName, #Version, POG_Model_Status, POG_Layout_Type, POG_Market_Specific, POG_Contact_Number and Fixture_Name Index. How do the records to retrieve all the columns above, but with a unique combination of fixture_name and reorder_number. It has no keys defined on the table.

    I guess that it is a simple problem but the fact I'm trying to retrieve all the columns I'm stumbling.

    Thanks in advance.

    Hello

    Sanders_2503 wrote:
    ... There are 4 million records in it and many with the same combination of POGName, #Version, POG_Model_Status, POG_Layout_Type, POG_Market_Specific, POG_Contact_Number and Fixture_Name Index. How do the records to retrieve all the columns above, but with a unique combination of fixture_name and reorder_number.

    I don't see a column named reorder_number. Do you mean fixture_reorder_number or part_reorder_number_9?

    So, you want only one row for each distinct combination of fixture_name and some other column (I'll assume it's fixture_reorder_number). Does it matter which line? They will not necessarily have the same values for the other columns.
    The following query returns the one with the first pogname (in sort order):

    WITH     got_r_num     AS
    (
         SELECT  pogname, index#version, pog_model_status, pog_layout_type
         ,     pog_market_specific, pog_contact_number, fixture_name
         ,     ROW_NUMBER () OVER ( PARTITION BY  fixture_name
                                   ,                    fixture_reorder_number
                             ORDER BY        pogname
                           )         AS r_num
         FROM    sps_prod
    )
    SELECT  pogname, index#version, pog_model_status, pog_layout_type
    ,     pog_market_specific, pog_contact_number, fixture_name
    FROM     got_r_num
    WHERE     r_num     = 1
    ;
    

    If there be a tie (i.e. two or more lines with the same fixture_name, fixture_number and pogname first) and then the will be chosen arbitrarily.

    Instead of "ORDER BY pogname", you can ORDER all the other columns OR expressions, but you must have an ORDER byclause of analytics. You can do "ORDER BY NULL" If you really want pcik an arbitrary line.

    I hope that answers your question.
    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements), and also publish the results you want from these data (or some examples of acceptable results).
    Explain, using specific examples, how you get these results from these data.
    Always tell what version of Oracle you are using.

  • How to manage and work with multiple libraries

    I decided to store my photos in annual libraries - but now I want to create a photo book with photos of two libraries.

    Is there a way of

    (1) create more products of a library?

    (2) otherwise: merge two libraries into one?

    Thank you!

    Does not support photos to merge libraries.

    It would more easily create a library for your book.

    • Export the photos that you want to use in the book of two libraries (select the photos and use file > export > export... versions).  Export photos to a high quality.
    • Import the photos exported in an empty library.  Create your book.
    • Then check in the library with the book project...

    This will have the advantage, that don't accidentally delete you or change the photos you used for your book.

    If you temporarily want to move photos between libraries, you can use the PowerPhotos application.  It allows you to navigate easily several libraries of Photos without having to open them in Photos.

  • How do the DAQmx sync with multiple devices

    Hi, I'm new in Labview. I need help for:

    1 change a program multi-function in order to record the data of three cards daq (devices 1-3) and output through the map (1 unit). The current program was created to record and output signal of one of the card (device). I tried to choose multiple devices when I run the program, but there is an error 200558 shows "a task cannot contain multiple independent devices. Create a task for each independent device.

    2. change the duration record for a longer period, for example: 0.1 s. Currently, the recording time is s 0.009971.

    I joined the multi - funtion.lld. AI des_v2_Multi-Funtion_Synch - AO.vi is the program that I need to change. I've also attached a file of input for runing the program signal.

    Thank you very much.

    Sincerely,

    Jie

    You have a cable RTSI connecting PCIe cards? In order for them at the time of sharing and triggers, you must install a RTSI cable like the one below.

    http://sine.NI.com/NIPs/CDs/view/p/lang/en/NID/12631

    What are the exact synchronization requirements you need for your tasks?

  • How to select only rows with multiple records below?

    Dear all,

    My Table looks at below:

    Table structure:
    CREATE TABLE T_20 (CONTROL NUMBER(10) NOT NULL,
                           PO NUMBER(10) NOT NULL,
                           AMENDNO NUMBER(3) NOT NULL,
                           FACTOR VARCHAR2(3) NOT NULL,
                           COMMENT_X VARCHAR2(40),
                           FLAG VARCHAR2(1))
    
    
    SQL> alter table t_20 add constraint t_20_pk primary key (control, po, amendno, factor);
    INSERT orders:

    SQL> INSERT INTO T_20 VALUES(101,1000,01,'MSC','NO COMMENT','Y')
      2  /
    
    1 row created.
    
    SQL> INSERT INTO T_20 VALUES(101,1000,02,'MSC','NO COMMENT','Y')
      2  /
    
    1 row created.
    
    SQL> INSERT INTO T_20 VALUES(101,1001,00,'NDP','NO COMMENT','Y')
      2  /
    
    1 row created.
    
    SQL> INSERT INTO T_20 VALUES(101,1001,01,'NDP','NO COMMENT','Y')
      2  /
    
    1 row created.
    
    SQL> INSERT INTO T_20 VALUES(102,1002,00,'ABC','NO COMMENT','Y')
      2  /
    
    1 row created.
    out put:
    SQL> SELECT * FROM T_20
      2  /
    
       CONTROL         PO    AMENDNO FAC COMMENT_X                                F 
    ---------- ---------- ---------- --- ---------------------------------------- - 
           101       1000          1 MSC NO COMMENT                               Y 
           101       1000          2 MSC NO COMMENT                               Y 
           101       1001          0 NDP NO COMMENT                               Y 
           101       1001          1 NDP NO COMMENT                               Y 
           102       1002          0 ABC NO COMMENT                               Y 
    Now, I want to select only the control number that have several acht.

    In above example only control 101 with several PO 2 PO with 1000 and 1001
    So I need to select only this 101 related lines...

    for 102 having in. sinple folders then it will have to be removed... because I have millions of records in the primary table...
    someone you suggest query... Thank you..

    Thanks in advance
    Prasanth

    Try this

    select *
      from (
    select t.*, count(distinct po) over(partition by control) cnt
      from t_20
          )
     where cnt > 1
    
  • How to query the data of Contact with multiple fields

    How can I query the data of Contact with multiple fields?

    For example, I'll get contacts which are changed after a point at the specified time and whose country is US. How could I make the chain of research of the SOAP API "Query"?

    And I also want to know how to make a search term for RESTful API for contacts above.

    Any suggestions?

    Thank you.

    Hi Biao,

    The following document describes how query for multiple fields using the SOAP API: request a Contact from several fields.

    And you can search multiple fields using the REST API with the & operator. For example, to search for a Contact by e-mail address and date of creation:

    Hope this helps and please let us know if you need more information.

    Thank you

    Fred

  • I've recently updated my firefox to my laptop. No longer can I do a search with Google without getting a message that the address of the site/is not secure. How to cancel?

    I've recently updated my firefox to my laptop. No longer can I do a search with Google without getting a message that the address of the site/is not secure. How to cancel? The only search that allows me to see whatever it is is Yahoo that I prefer not to use. In addition, I have to click through a series of tabs to make sure that I know that Yahoo does not feel that the site is secure before it connects. I must tell you that I have strongly dislikes this upgrade and want to return to the old Firefox.

    What is you receive the exact error message? Did you check your date and time? Refreshed Firefox? Refresh Firefox – reset the parameters and modules

  • How to disable "Search with" in the url bar in Firefox Developer?

    How to disable "Search with" in the url bar in Firefox Developer?
    Thank you

    Hi hamid, in order to change this enter on: config in the address bar of firefox (confirmed the message information where it appears) and search for the preference named browser.urlbar.unifiedcomplete. Double-click it and change its value to false.

  • The search with BING when I type my research topic in the address bar. How can I change?

    The search with BING when I type my research topic in the address bar. I wish it were google again.
    How can I change?

    Hi sarou,.

    Take a look at this article on the keyword service. It will show you how to get back to Google.

    Hope this helps!

  • How to use windows search to search the contents of a bunch of files with random names / extensions?

    How to use windows search to search the contents of a bunch of files with random names / extensions? Plain txt files say 1,000 with random name of file extensions?

    You can always search within those, but you need to add extensions to the file system so that it knows to look inside these files.  You said that you have a lot, so it's perhaps tedious.  Here's How to search within several types of files.

    One thing you could try is rather to make a copy of this file, rename all the files to the same extension (even an extension false for example something.bill) and perform your search on this band.  Just an idea.

  • How can I actually talk to support multiple issues with multiple devices (software, hardware, account of the question?

    How can I actually speak to technical support issues to nulitple with multiple devices (software, hardware, account problems,) I have a touch screen of hp with windows 7 Home, Ipod, home router wireless, boost, WiFi, wii, etc.... Problems with windows live net Passport vs msn Id, problems with zune vs itunes and windows media that nobody wants play nice together.

    My touchscreen notes will use only a google account, music another program, and of course until recently google was not an option on the windows phone. of course if I'm going now that I'll lose all the games and music. His tent so frustrating of any help, that nobody seems to know how often these devices and programs interact (or care) HP has been of little use, even for my provider windows, microsoft, living cells and zune etc...

    All the changes that took place this last month will help but gets boring. I consider myself pretty computer savy, but maybe not, should not this difficult. I realized about a year ago I would have hired a technician but it seems immpossible to find someone who knows enough about all of the equipment and software to really do some good. My Hp touchscreen computer does not even play nice with their own HP printers. I really regret the time and money I spent. I could every Mac.

    All of the suggestions. Even your options do not address several problems of interaction with the hardware and software all needs of problems to adapt to a single category.

    Hello


    To correct the software issues run the methods mentioned below.
     
    Method 1: run the troubleshooter and check if the problem is resolved.
    http://Windows.Microsoft.com/en-us/Windows7/open-the-performance-Troubleshooter

    Method 2 : run a SFC (System File Checker) scan and see if the problem occurs.
    http://support.Microsoft.com/kb/929833

    Method 3 : run Clean boot and check if the problem persists.


    To help resolve the error and other messages, you can start Windows XP, Vista or Windows 7 by using a minimal set of drivers and startup programs. This type of boot is known as a "clean boot". A clean boot helps eliminate software conflicts.

    Note: follow step 7 to reset the computer to start as usual after the boot process.
    http://support.Microsoft.com/kb/929135

    To solve the problems related to Windows Live and MSN to check the links below on contact.

     
    To solve the problems related to the HP touch computer

    Update the HP touch drivers from the manufacturers Web site.

    Hope that helps.
  • How can I send docs to multiple signatories with different addresses on sign of Echo?

    How can I send docs to multiple signatories with different addresses on sign of Echo?

    Hello

    In EchoSign, you simply have to add e-mail addresses to each signatory in the box 'To' and set the saved order. If you have to close, you must enter your last e-mail address and check the box "I need to sign. The shape that you send must have signature of blocks for each signatory but apart from that, there are other special rules or the necessary implementation. If you continue to experience problems try this, detail your problem here and I'll do what I can to help.

    See you soon!

    EchoSign-Rob!

Maybe you are looking for

  • How to connect my computer toshiba laptop to a stereo system

    Could someone offer me please advice on how connect my laptop to a toshiba stereo system?

  • Unknown Album folder created

    I have a problem of nuisance with MP3 Audiobook to be copied to the internal memory of my computer, the last two books which I copied to the device was put in a folder called 'Albums '... unknown Anyone have any idea what causes this and a way to pre

  • recovery dvd USB kit

    After my hard drive crashed on my pavillion dv-7, it had to be replaced. So I ordered the HP recovery DVD kit. Now it turns out that I have a problem with my DVD player as well. It does not start from the recovery DVD I received from HP. My question

  • bitmaps multiset - how to make part of a bitmap

    Hi all. Does anyone know how can I copy a portion of a bitmap? BB is already doing. You can see if you look at plazmic resources Kit. For example, wireless power indicator is a file of type multiset png, and when the force is changed, a different par

  • Problem with javascript in narrative mode

    Hi gurus!I'm trying to put conditional logic in a narrative view of my analysis. I found some advice and wrote that:< script >If ('@ {} {FIN01TIME}'== 'Period'){document. Write ("[b] fiscal year: [/b]@1 [b] Fiscal Quarter: [/b]@2 [b] fiscal year: [/b