Professional Web Applications Themes

advanced search - Dreamweaver AppDev

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 ...

  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 'vrvice' and funorcorr_change like 'varCOR' and
    funorcorr_change like 'varproblem' and funorcorr_change like 'varincident'
    and call.systemid like 'varsystem') and (funorcorr_change like 'vrvice'
    and call.systemid like 'varsystem') and
    ( funorcorr_change like 'vrvice' or funorcorr_change like 'varincident'
    and call.systemid like 'varsystem' ) and (funorcorr_change like 'vrvice'
    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
    vrvice = 3
    varincident = 4
    varproblem 5

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


    rajesh Guest

  2. #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

  3. #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" <webforumsusermacromedia.com> wrote in message
    news:cvp39s$4t$1forums.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

Similar Threads

  1. Need help with advanced search please!!
    By EnergyFed in forum Coldfusion - Advanced Techniques
    Replies: 2
    Last Post: June 27th, 01:36 PM
  2. advanced search with php
    By Maceomedia in forum Dreamweaver AppDev
    Replies: 0
    Last Post: May 17th, 08:12 AM
  3. Advanced search (Verity)
    By SkyZee in forum Macromedia ColdFusion
    Replies: 2
    Last Post: April 26th, 10:17 PM
  4. #25786 [NEW]: PHP website uses cookies to remember last search phrase in search box
    By tipsen at imada dot sdu dot dk in forum PHP Development
    Replies: 0
    Last Post: October 8th, 08:24 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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