Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2005
    Posts
    27

    AND OR NOT With Sqlite ?

    hi every one

    it is another strange Quistion

    How can i use AND , OR , NOT with my project?

    i want to put check boxes one for each value ( AND , NOT , OR ) and when i select the box the search in the next field will get the value

    i.e Title Windows AND Author Mark

    is it clear

  2. #2
    Join Date
    May 2005
    Posts
    1,115
    Well simply concat the query... here is a hint:

    Code:
    query=" <some query> where ";
    
    title=title --for example "windows"
    operator=operator --for example "AND" --> set this on your checkboxes event
    author=autor --for example "mark"
    
    query=query.."title='"..title.."' "..operator.." "..author='"..autor.."'"
    Last edited by bule; 02-19-2007 at 03:45 AM.
    Never know what life is gonna throw at you.
    (Based on a true story.)

  3. #3
    Join Date
    Mar 2005
    Posts
    27
    Quote Originally Posted by bule View Post
    Well simply concat the query... here is a hint:

    Code:
    query=" <some query> where ";
    
    title=title --for example "windows"
    operator=operator --for example "AND" --> set this on your checkboxes event
    author=autor --for example "mark"
    
    query=query.."title='"..title.."' "..operator.." "..author='"..autor.."'"
    thank alot

    but how can i use these operators with combo box

    as seen on attached image
    Attached Images

  4. #4
    Join Date
    May 2005
    Posts
    1,115
    Well first.... if you have three input boxes, then you need only two comboboxes.
    Never know what life is gonna throw at you.
    (Based on a true story.)

  5. #5
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    What is being typed into the input boxes. Is the user supposed to type Select * from mytable or are they just going to enter search criteria and not column or table information?

    In any case you will have to use some if statements to check and see if there is anything populated in the inputbox. If there is then you can add it to your query.

    sQuery = "Select * from mytable"
    if Input.GetText("input1") then
    sQuery = sQuery .. " where column = " .. Input.GetText("input1")
    if Input.GetText ("input2") then
    nConj = ComboBox.GetItemText("ComboBox", nSel)
    sQuery = sQuery .. ", " .. nConj .. " column = " .. Input.GetText("input1")
    end
    end

    or something like that anyway.

    HTH
    Tigg
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

Posting Permissions

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