Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default advanced search

    hi,
    I building a advanced search funcationality
    with 3 listbox and 5 checkbox

    so want I want that you can search with all possible ways'
    cross searching
    but when working checkbox's (you can checked multiple)
    together is not working
    when select one checkbox is working
    but selecting more give no output

    so what i am doing wrong here
    may someone can give me input how to solve this damn search

    here is my sql statement
    SELECT Call.CallID, Call.IntakeDate, Call.IntakeBy, Call.SystemID,
    Call.ShortDescription, Call.PriorityID, Call.CustomerName,
    Q_LastLogstatus.CallStatusID, Q_LastLogstatus.CallStatus, Tblstatus.fimage,
    Tblcontype.typeimage, Call.[Service Request], Call.CallTypeID,
    Call.CallDescription, Support.SupportTeamID FROM ((Tblstatus RIGHT JOIN
    ((Call INNER JOIN Q_LastLogstatus ON Call.CallID = Q_LastLogstatus.CallID)
    LEFT JOIN Finance ON Call.CallID = Finance.CallId) ON Tblstatus.fstatusid =
    Finance.chgapproval) INNER JOIN Tblcontype ON Call.FunORCorr_change =
    Tblcontype.typeid) INNER JOIN Support ON Call.IntakeBy = Support.SupportID
    where call.callid like 'varcallid' and (call.systemid like 'varsystem' and
    Q_LastLogstatus.callstatusid like 'varstatus') and (support.supportteamid
    like 'varsupport' ) and (funorcorr_change like 'varfun' and
    funorcorr_change like 'varservice' and funorcorr_change like 'varCOR' and
    funorcorr_change like 'varproblem' and funorcorr_change like 'varincident'
    and call.systemid like 'varsystem') and (funorcorr_change like 'varservice'
    and call.systemid like 'varsystem') and
    ( funorcorr_change like 'varservice' or funorcorr_change like 'varincident'
    and call.systemid like 'varsystem' ) and (funorcorr_change like 'varservice'
    or funorcorr_change like 'varincident' and Q_LastLogstatus.callstatusid like
    'varstatus')


    and
    default value = %
    runtime is with "request"

    perhaps some more info

    if you can see funorcorr_change
    this is a field in a table and can have 1 to 5 ofcourse based on the
    checkbox
    so
    varFUN = 1
    varCOR = 2
    varservice = 3
    varincident = 4
    varproblem 5

    so can someone help me building a advanced search criteria page?
    gr. kisoen


    rajesh Guest

  2. Similar Questions and Discussions

    1. Need help with advanced search please!!
      I am trying to create a search that searches two fields and highlights the search term. How can I do this? Here is my code as of now: <cfquery...
    2. advanced search with php
      Does anybody know of a good tutorial on how to do a search for any/all words with php? Thanks
    3. Advanced search (Verity)
      Somebody, please help me! Tell me how I can search and select from results entries of sought word only within title, body, URL, alternate text and...
    4. ANN: InterAKT Site Search - search in multiple tables
      Hello, We have just released a new product, MX Site Search, meant to help web developers and designers create a search form in their dynamic...
    5. #25786 [NEW]: PHP website uses cookies to remember last search phrase in search box
      From: tipsen at imada dot sdu dot dk Operating system: - PHP version: Irrelevant PHP Bug Type: Unknown/Other Function Bug...
  3. #2

    Default Re: advanced search

    hm.. your use of like for all of your comparisons is a little bizzare.. like
    will do some string substring search tricks.. but if you are checking boolean
    values (I guess since you are using checkboxes), I would build my where clause
    one field at a time.. start with SELECTSTATEMENT='select stuff from tables
    where 1=1' and if a checkbox is checked add the next part of the where however
    makes sense for the boolean SELECTSTATEMENT=SELECTSTATEMENT + ' AND MYFIELD =
    TRUE ' and so on for each boolean idea.. I am not sure where you are going
    with the likes..

    RichMcCrea Guest

  4. #3

    Default Re: advanced search

    oke,

    I have coding now
    SELECT Call.CallID, Call.IntakeDate, Support.SupportName,
    Call.FunORCorr_change, Call.SystemID, Call.ShortDescription
    FROM Call INNER JOIN Support ON Call.IntakeBy = Support.SupportID
    ___
    where call.callid= 'varcall' or (call.systemid = 'varsystem' and
    call.funorcorr_change = 'varfun') order by call.intakedate desc
    ___

    if you can see the varcall is working fine (is based on searching for 1
    particular record
    the vasystem (if i do only varsystem it's working but together with varfun
    not)

    I hope you can help me with this I want to have a multiple search
    functionality with listbox and checkbox
    and cross searching but not working properly

    I'm doing something wrong?
    please advise
    kisoen



    "RichMcCrea" <webforumsuser@macromedia.com> wrote in message
    news:cvp39s$4t$1@forums.macromedia.com...
    > hm.. your use of like for all of your comparisons is a little bizzare..
    > like
    > will do some string substring search tricks.. but if you are checking
    > boolean
    > values (I guess since you are using checkboxes), I would build my where
    > clause
    > one field at a time.. start with SELECTSTATEMENT='select stuff from
    > tables
    > where 1=1' and if a checkbox is checked add the next part of the where
    > however
    > makes sense for the boolean SELECTSTATEMENT=SELECTSTATEMENT + ' AND
    > MYFIELD =
    > TRUE ' and so on for each boolean idea.. I am not sure where you are
    > going
    > with the likes..
    >

    rajesh Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139