Searching multipul fields in a database

hi there,
im working on a scouting website, and i have a database that
has details of camps all over the northeast. all this data is
housed on one table. each row houses the info for one camp, and
each column represents an attribute. there are about 170 rows. i
need to make a search form with several check boxes, one for each
camp attribute, and when the database is searched, the boxes that
are checked are checked against their courrosponding colums in the
database for a string, usually "yes" . then on the results page,
only camps that got positive matches on all of the checked
attributes are displayed. if a box is not checked, it is ignored,
so the value in the db can be anything. id like to do this with
php, and im working with a MySQL db, and using DW8, and on a Linux
server running apache. im not sure where to even start. im not too
literate in php or sql, so any help you can offer is greatly
appreciated. thanks a lot!

Hello,
I think you have to start at the beginning:
http://dev.mysql.com/doc/refman/4.1/en/select.html

Similar Messages

  • How to bind JtextFields in Swing to Table fields in the database

    Can some one give the code of how to bind JtextFields in Swing to Table fields in the database
    Am really new to java programming and have interest in learning

    The standard JDK doesn't do this for you. If you search on Google, you may find some 3rd party packages that will do this.
    You need to create your own form add execute the appropriate SQL yourself. Read the tutorial on [url http://java.sun.com/docs/books/tutorial/]JDBC Database Access to get started.

  • How to searc a different field in a database depending on user input

    I havea page with witha search form that has a search from and a number of
    radio buttons to choose from. The radio buttons have the same name as
    particular fields in my database. Ther serach form is shown here.
    <form name="searchForm" id="searchForm" method="post" action="search_participants">
          <div>
            <input name="search" type="radio" value="Participant_Name" />
        Participant ID </div>
          <div>
            <input name="search" type="radio" value="First_Name" />
        First name </div>
          <div>
            <input name="search" type="radio" value="Last_Name" />
        Last name </div>
          <div>
            <input name="search" type="radio" value="Details" />
        Details</div>
          <div>
            <input name="search" type="radio" value="Email" />
        E-Mail</div>
          <p class="menu">
            <input name="searchField" type="text" id="searchField" size="20" />
            <input name="Submit" type="submit" id="Submit3" value="Search" />
          </p>
        </form>
    PreparedStatement StatementparticipantRecordset = ConnparticipantRecordset.prepareStatement("SELECT User_ID, Participant_ID, Password, First_Name, Last_Name, Details, Email FROM Administration.participant WHERE Participant_ID = '" + searchString + "' ");This code works fine at the mo but how do i replace the particicpant_ID part
    with my dynamic searchFor String that I have. I have allreadt tried a few times
    but i could not get it to work. Could someone please give me the correct
    syntax to do this.
    Thanks

    Crossposted: http://forum.java.sun.com/thread.jspa?threadID=633849&messageID=3677215#3677215

  • Is it possible to have one search box search many fields? ( and "autocomplete" the results)?

    I'm really new to the whole area of JSON, autocomplete and javascript. My first project in this area is personal: making it easier to search for wines in my wine cellar.
    I have all my wines in a sqlite database (driven by CF 9 of course) and have a nice UI to report on, add, modify, delete, etc.  What I want to add is a search capability that works like this:  a user types text in a search box in any order they want and automagically, the wine is found. 
    To be specific, a user could start with "2005 Caymus" and the area below the text search box would be populated with all of the varietals of Caymus for 2005 that are in the cellar.   Similarly the user might start the search by typing "2005 Cabernet" in which case anything in the cellar that is from 2005 and a Cabernet Sauvignon or a Cabernet Franc from all wineries would appear below the text box. Or maybe they just want to see what French wines are in the cellar, so they'd start their search with "France" or "French". (BTW,  winery, vintage, wine type (varietal), country, appellation, etc. are all separate fields in the database/table.)
    Is my imagined search capability possible, or does each aspect of the search (year, winery, wine type/varietal) have to be user-entered into a separate text box?
    Any guidance/answers greatly appreciated!  If you're local, might even be worth sharing a vintage bottle of wine!

    Sorry I was unclear.
    Google is a single text box.  If you type "coldfusion 9 new features"
    you get a good listing of your results without having one box for
    software one for version one for descriptor and
    one for topic .  Similarly with Google it's likely you'll get
    somewhat similar results typing in "new features coldfusion 9" or
    "coldfusion 9 features".  So for my wine app I just want to present the
    user with one box so they can type in "Caymus 2005 Cabernet Sauvignon"
    (a "specific" search) or "2005" (a search for all wines from that year),
    etc.  It's the cleanness of the user experience I'm trying to
    accommodate here.    Make sense?

  • How to search a string from the database?

    how to search a string from the database? starting with some character

    If you're trying to do this in a SELECT, you can use the LIKE verb in your WHERE clause.
    Here's an Example
      SELECT obj_name FROM tadir
        INTO prog
        WHERE pgmid = 'R3TR'
          AND object = 'PROG'
          AND obj_name LIKE 'Z%'.
    In this case it will select every row that obj_name starts with Z. 
    If you wanted to find every row that the field obj_name contains say... 'WIN'  you use LIKE '%WIN%'.
    Edited by: Paul Chapman on Apr 22, 2008 12:32 PM

  • Text field salve in database (BLOB? )

    I'd like that a field (in forms) could hold a text whith format (italic, underline,...).
    And this field can be safe in database oracle. I've searching and I found the type LOB.
    Could I use the field like a BLOB?? How can I link this field and the database?
    Thanks in advance..
         Sueli
    [email protected]

    You can store the file in a blob (it's just binary data) but you won't be able to display it in forms. If you're talking about a word document, you could use ole to invoke word.
    blob fields, in forms, are of type IMAGE (the only type that can be displayed on the canvas). Define your forms field as IMAGE, just make sure you don't map the field to a canvas.
    Regards,
    Bert

  • Searching text field

    Hello everyone, I have a search box and I would like to
    search through a text field in my database. I have been researching
    on the best way to do this but not too much luck. I am not the
    admin of the server holding my site but I can always ask to see if
    they have functions that you guys recommend. I use a mysql database
    and I have the search working but it only pulls up records that
    match the keyword that I have entered. If the user types in pop and
    goodpop is in the database nothing comes up. The keyword field in
    my data base is populated by the user through a from and it will
    consist of many key words.
    I hope this awesome forum can help me out.
    JN

    when using LIKE you do not need to do the analysis more than
    once ... you are doing the same comparison 3 times in the code you
    posted.
    all you need is :
    Where CustKeyWords LIKE '%#form.crud#%'
    however, if you actually use a phrase like "pop of can" and
    expect to find "can of pop" that will not work because LIKE looks
    for the existance of the word or phrase in any row of data for that
    field.
    i.e. "pop" will result in finding any record with "pop" in it
    ... "can of pop", "pop can", "lollipop", "popsicle", etc.
    however the phrase "pop of can" has no relavent bearing to
    "can of pop"
    If you want to find records that contain ANY of the owrds
    entered, and not just the exact phrase, then you will have to
    divide the phrase up into individual words and that is when you
    will need the OR function to search for multiple match potentials
    in the case of "pop of can" you would divide that into :
    crud1 = "pop"
    crud2 = "of"
    crud3 = "can"
    then your code would be something like
    Where CustKeyWords LIKE '%#form.crud1#%' or CustKeyWords LIKE
    '%#form.crud2#%' or CustKeyWords LIKE %'#form.crud3#%'
    This is just a concept and would need to be tweaked to allow
    for any combination of words, since you wouldn't necessarily always
    have 3 words on a phrase and wouldn't necessarily have a phrase at
    all ... just a word.
    An array or list would likely work best for this.
    It is always usually a good idea to remove common words from
    phrases as well (i.e. "of" , "and" , "the", etc) because otherwise
    you could end up with pretty much every entry from your database.

  • Link between different fields in different databases

    Hi
    I have two asp pages displaying the contents of two different
    databases. I
    also have a link in a field of the first database to open the
    second asp
    page (<a href="results.asp">
    . However, that way I see the top of the
    results.asp, while I want to go to a specific field of the
    database that is
    connected to results.asp.
    In HTML words I want to define an ancor in a field of
    database2 and call it
    from a link in a field of database1.
    Please note that this is my first try in asp, so take it easy
    Thanks
    [gt] aka geotso
    Please, remove hyphens to contact me

    <a href="results.asp#field">
    and then on results.asp, you would have -
    <p id="field">whatever</p>
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "geotso" <[email protected]> wrote in message
    news:e3iicm$7b7$[email protected]..
    > Hi
    > I have two asp pages displaying the contents of two
    different databases. I
    > also have a link in a field of the first database to
    open the second asp
    > page (<a href="results.asp">
    . However, that way I see the top of the
    > results.asp, while I want to go to a specific field of
    the database that
    > is connected to results.asp.
    >
    > In HTML words I want to define an ancor in a field of
    database2 and call
    > it from a link in a field of database1.
    >
    > Please note that this is my first try in asp, so take it
    easy
    >
    > Thanks
    >
    > ------- ---- --- -- - -
    > [gt] aka geotso
    > ------- ---- --- -- - -
    > Please, remove hyphens to contact me

  • Is there a way to have a search form for the CRM database?

    I know there is a search form provided for the Web Apps. I can't seem to find how to create a search form for the CRM database. I have created a membership site, and also extended the CRM database with additional fields. I would like the users to be able to search on selected fields in the CRM database including the extended database fields. For example, I have a field called membership type in the extended database. I would like to be able to search on that in a search form. Is that possible?
    Thanks

    Sidney,
    Your input is very helpful to put me on the track to find a workaround. As I tried using Web App approach, I get into a road block that hopefully you can help throw some light on.
    This my scenerio: I created a Web App for holding the profile fields (called it Profile). I created a Page to display the Customer record (Names, usernames, email, etc, and I would also want to display the fields from the Profile Web App. I am at lost how to do that. Seems like I can only insert the web item list in that page but I actually want to display the Detall Layout instead of the List layout. To display the Detail Layout, I need to first manually choose the item before it will direct me to the Detail layout. I am trying to find a way to do this automatically based on the fact I have only one Profile web app item for each customer.
    The question is whether there is a way to pull up a specific Profile web app item based on the customer's id or something that link the two together, using javascript or whatever method. Is there a tag to gives me the customer record id? If I can get that id, I could insert that id into one of the fields in the Profile Web App during creation of profile. Perhaps I can then pull up the profile item based on this id.
    Thanks for all the help
    Steve

  • How to search this value in oracle database to find out the table

    Hi expert,
    I know there is a value in oracle database, please show me how to search this value in oracle database to find out the table holding this value.
    Many Thanks,

    918440 wrote:
    Hi friends,
    this question is really practical, I already know there is value from application saved in database, I want to search the whole database to figure out which table the value is contained.write SQL that writes SQL to query every table.
    Handle:     918440
    Status Level:     Newbie
    Registered:     Mar 2, 2012
    Total Posts:     20
    Total Questions:     10 (10 unresolved)
    why do you waste time here when you NEVER get any answer to any question you post?

  • Getting the length of a field in a database.

    I have a field in a database that has a char length of 20, is there anyway to get that length from the database.

    I probally didn't explain myself properley. The field might not have anything in it. The field would only except a length of 20, some have 10 others 5.
    I have a GUI repersenting a table in the database. When the user is inputting into this field I want to stop them from entering more than 20 Characters. I need to know how many characters the field will accept.
    I'm trying to stop my client from calling me up and saying that there something rong with the program because when he enters data, it only saves half of it.

  • Extracting Values of a Field from a Database Table in SAP ECC System

    Hi,
    I downloaded Extracting Values of a Field from a Database Table in SAP ECC System Using MII 12.0
    senario from sdn. I'm trying to do that senario in MII 12.05. But I have problem with section 6 in page 7 (you can supply senario from sdn)
    "6- Under the loop of Repeater, use action u2018Rowu2019 to append just the string part of the WA which will display only values for field u2018Batchu2019"
    I did not find WA elemen in Output element of Repeater_0
    How can I create WA element?
    Thanks.

    Cemil,
    Set up a SAP JCo Interface action block.  Use the RFC name RFC_READ_TABLE.
    In the link editor map the table to "MARA", set RowCount to something small (20 is good sample size) and create an xml transaction property named FIELDS and copy the following into it:
    <?xml version="1.0" encoding="UTF-8"?><FIELDS>
          <item>
            <FIELDNAME>MATNR</FIELDNAME>
            <OFFSET/>
            <LENGTH/>
            <TYPE/>
            <FIELDTEXT/>
          </item>
          <item>
            <FIELDNAME>MTART</FIELDNAME>
            <OFFSET/>
            <LENGTH/>
            <TYPE/>
            <FIELDTEXT/>
          </item>
          <item>
            <FIELDNAME>BSTME</FIELDNAME>
            <OFFSET/>
            <LENGTH/>
            <TYPE/>
            <FIELDTEXT/>
          </item>
          <item>
            <FIELDNAME>XCHPF</FIELDNAME>
            <OFFSET/>
            <LENGTH/>
            <TYPE/>
            <FIELDTEXT/>
          </item>
          <item>
            <FIELDNAME>DATAB</FIELDNAME>
            <OFFSET/>
            <LENGTH/>
            <TYPE/>
            <FIELDTEXT/>
          </item>
        </FIELDS>
    Then link the Transaction.FIELDS to SAP_JCo_Interface_0.Request{/RFC_READ_TABLE/TABLES/FIELDS}.  You may run into problems with two other fields and optionally they can be removed (set link type to remove xml).  I usually remove them initially for testing.  The two fields are:
    SAP_JCo_Interface_0.Request{/RFC_READ_TABLE/INPUT/NO_DATA}
    SAP_JCo_Interface_0.Request{/RFC_READ_TABLE/INPUT/DELIMITER} (or you can set this to something like a semicolon,";" or tilda,"~".  I find it easier to caclulate position by length, but that is my own idiosyncrasy.)
    Once you get this one working, we can explore how to do filtering on the dataset.  Your output should be something like this:
    <?xml version="1.0" encoding="utf-8"?>
    <RFC_READ_TABLE>
      <INPUT>
        <DELIMITER />
        <NO_DATA />
        <QUERY_TABLE>MARA</QUERY_TABLE>
        <ROWCOUNT>20</ROWCOUNT>
        <ROWSKIPS>0</ROWSKIPS>
      </INPUT>
      <TABLES>
        <DATA>
          <item>
            <WA>000000000000000023ROH 00000000</WA>
          </item>
          <item>
            <WA>000000000000000038HALB 00000000</WA>
          </item>
          <item>
            <WA>000000000000000043HAWA 00000000</WA>
          </item>
          <item>
            <WA>000000000000000058HIBE 00000000</WA>
          </item>
          <item>
            <WA>000000000000000059HIBE 00000000</WA>
          </item>
          <item>
            <WA>000000000000000068FHMI 00000000</WA>
          </item>
          <item>
            <WA>000000000000000078DIEN 00000000</WA>
          </item>
          <item>
            <WA>000000000000000088FERT 00000000</WA>
          </item>
          <item>
            <WA>000000000000000089FERT 00000000</WA>
          </item>
          <item>
            <WA>000000000000000098HALB 00000000</WA>
          </item>
          <item>
            <WA>000000000000000170NLAG 00000000</WA>
          </item>
          <item>
            <WA>000000000000000178NLAG 00000000</WA>
          </item>
          <item>
            <WA>000000000000000188NLAG 00000000</WA>
          </item>
          <item>
            <WA>000000000000000288HALB 00000000</WA>
          </item>
          <item>
            <WA>000000000000000358HAWA 00000000</WA>
          </item>
          <item>
            <WA>000000000000000359HAWA 00000000</WA>
          </item>
          <item>
            <WA>000000000000000521HAWA 00000000</WA>
          </item>
          <item>
            <WA>000000000000000578FERT 00000000</WA>
          </item>
          <item>
            <WA>000000000000000597HAWA 00000000</WA>
          </item>
          <item>
            <WA>000000000000000598VERP 00000000</WA>
          </item>
        </DATA>
        <FIELDS>
          <item>
            <FIELDNAME>MATNR</FIELDNAME>
            <OFFSET>000000</OFFSET>
            <LENGTH>000018</LENGTH>
            <TYPE>C</TYPE>
            <FIELDTEXT>Material Number</FIELDTEXT>
          </item>
          <item>
            <FIELDNAME>MTART</FIELDNAME>
            <OFFSET>000018</OFFSET>
            <LENGTH>000004</LENGTH>
            <TYPE>C</TYPE>
            <FIELDTEXT>Material Type</FIELDTEXT>
          </item>
          <item>
            <FIELDNAME>BSTME</FIELDNAME>
            <OFFSET>000022</OFFSET>
            <LENGTH>000003</LENGTH>
            <TYPE>C</TYPE>
            <FIELDTEXT>Purchase Order Unit of Measure</FIELDTEXT>
          </item>
          <item>
            <FIELDNAME>XCHPF</FIELDNAME>
            <OFFSET>000025</OFFSET>
            <LENGTH>000001</LENGTH>
            <TYPE>C</TYPE>
            <FIELDTEXT>Batch management requirement indicator</FIELDTEXT>
          </item>
          <item>
            <FIELDNAME>DATAB</FIELDNAME>
            <OFFSET>000026</OFFSET>
            <LENGTH>000008</LENGTH>
            <TYPE>D</TYPE>
            <FIELDTEXT>Valid-From Date</FIELDTEXT>
          </item>
        </FIELDS>
        <OPTIONS />
      </TABLES>
    </RFC_READ_TABLE>
    Add a repeater sourced on:
    SAP_JCo_Interface_0.Response{/RFC_READ_TABLE/TABLES/DATA/item}
    Link your repeater output to a tracer with this:
    Repeater_0.Output{/item/WA}
    What you will see in each tracer message is a single line of data with all the fields contents concatenated together.  You can look up what each field in the string represents by the length of the field as returned in the Response segment of the RFC_READ_TABLE rfc.  Then you can parse out the data you are interested in.
    Give this a try and let me know how you succeeded.
    By the way, I could not find the scenario you referred to.  Can you post a link?
    Regards,
    Mike
    Edited by: Michael Appleby on Jan 12, 2009 5:16 PM

  • To replace values of one of the field in the database table

    How to replace values of one of the field in the database table with a new values? Pls help to solve

    Hi
    You can use the UPDATE command to update one of the field value in a table
    see the UPDATE syntax and use it
    but in real time you should not do like this
    Regards
    Anji

  • How to delete data from single field in a database table?

    Hi guys,
         Plz suggest me How to delete data from single field in a database table?
    thnks,
    pavan

    hi
    in addition to abv details..chk this:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3aef358411d1829f0000e829fbfe/content.htm
    http://dev.mysql.com/doc/maxdb/en/34/ee7fbd293911d3a97d00a0c9449261/content.htm
    regards,
    madhu

  • To modify a field in a database table based record identification by primar

    hi
    i want to to modify a field in a database table based record identification by primary key filed and two more fields
    ie customer (primary key
    i want to modify record from intenal table the record existing with primary key field customer
    the status field needs to be mofied as " value rolled"
    the below code is happening
    loop at it_record into wa_Record
    wa_inv-customer (primary key) = wa_Record=custome
    wa_inv-date = wa_Record-date
    ...so one
    append wa_inv to it_invest
    clear wa_inv
    endloop.
    if not it_invest  is initial
    modify TABle1 ( this table is data base table which needs to be mofified) based on the primary key field
    and also date field and status field which is not primary key.
    regards
    arora

    Hi there.
    Your requirement is to update a Z Database table from your internal table, right? You have several options:
    LOOP AT it_invest INTO wa_inv.
      UPDATE dbtable
         SET date = wa_inv-date
       WHERE prim_key = wa_inv-prim_key
         AND any_field = wa_inv-any_field.
    ENDLOOP.
    or
    LOOP AT it_invest INTO wa_inv.
      UPDATE dbtable FROM wa_inv. "if wa_inv of same type of dbtable
    ENDLOOP.
    In the first example, I wrote any field because you can update dbase table, filtering for fields that don't belong to the primary key. However, remember that you will change all records that respect the key you used (so, in your case, use the primary key).
    Regards.
    Valter Oliveira.

Maybe you are looking for

  • How do i set up mailboxes to organize my emails in my iphone5?

    The mailboxes that appear are Inbox, VIP, Sent and Trash. Isn't there a way for me to create my own mailboxes to organize emails on the iphone5 just as I do on my computer? How do I do it?

  • How do I install java on my iPad 2

    How do I install java on my ipad2.  Pogo and games in yahoo need it to run the games.

  • RSS implementation: error  MM_XSLTransform error.

    I'm new to this forum so please forgive in advance any dumb questions.  I am using CS3 trying to post RSS feeds on my web site from an external xml source.  I have configured a testing server running Suse 11.1 / Apache/ PHP 5.2 for development purpos

  • Connecting with database using setproperty over SOAP connection

    The following method connects to a MySQL database. public void setDBDriverName(String in)      dbDriverName = in; public void setDBConnection(String in)      dbConnection = in; public void connectToMySQLDatabase() throws SQLException      if(dbCon ==

  • AE will not import live photoshop 3d correctly

    Hi, I've spent a lot of time researching forums, watching tutorials trying to solve this problem to know avail.  I have found some threads that have the same problem, but no solutions have worked.  I'm using CS4 in both photoshop and AE.  My problem