Switch with query only partly works???

I have the following query:
$varSearch_RS_Search = "-1";
if (isset($_GET['Search'])) {
  $varSearch_RS_Search = $_GET['Search'];
mysql_select_db($database_dconn, $dconn);
$query_RS_Search = sprintf("SELECT * FROM products WHERE Category LIKE %s OR products.Manufacturer LIKE %s OR products.Model LIKE %s OR products.Color LIKE %s AND Category!= 'Stage Pianos' AND Category!= 'Recent Pianos' AND Category!= 'Recent Keyboards'", GetSQLValueString("%" . $varSearch_RS_Search . "%", "text"),GetSQLValueString("%" . $varSearch_RS_Search . "%", "text"),GetSQLValueString("%" . $varSearch_RS_Search . "%", "text"),GetSQLValueString("%" . $varSearch_RS_Search . "%", "text"));
switch( $_GET['Sort'] ){
    case '':
        $query_RS_Search .= 'ORDER BY price ASC';
        break;
          case 'Low to High':
        $query_RS_Search .= 'ORDER BYprice ASC';
        break;
    case 'High to Low':
        $query_RS_Search .= 'ORDER BYprice DESC';
        break;
    case 'Color':
        $query_RS_Search .= 'ORDER BY Color ASC';
        break;
    case '0-500':
        $query_RS_Search .= 'AND price BETWEEN 0 AND 500 ORDER BY price ASC';
        break;
          case '500-1000':
        $query_RS_Search .= 'AND price BETWEEN 500 AND 1000 ORDER BY price ASC';
        break;
                    case '1000-2000':
        $query_RS_Search .= 'AND price BETWEEN 1000 AND 2000 ORDER BY price ASC';
        break;
          case '2000':
        $query_RS_Search .= 'AND price BETWEEN 2000 AND 10000 ORDER BY price ASC';
        break;
$query_limit_RS_Search = sprintf("%s LIMIT %d, %d", $query_RS_Search, $startRow_RS_Search, $maxRows_RS_Search);
$RS_Search = mysql_query($query_limit_RS_Search, $dconn) or die(mysql_error());
$row_RS_Search = mysql_fetch_assoc($RS_Search);
The switch works fine for Low to High, High to low and color, however as soon as I try to switch 0-500 it doesn't select the product between 0 and 500 or the other between ranges.
I would like these switches to work as well.
Any help welcome

What I wanted to do was if the $_GET['Sort'] was e.g  0-500 the query would read:
sprintf("SELECT * FROM products WHERE Category LIKE %s OR products.Manufacturer LIKE %s OR products.Model LIKE %s OR products.Color LIKE %s AND Category!= 'Stage Pianos' AND Category!= 'Recent Pianos' AND Category!= 'Recent Keyboards' AND price BETWEEN 0 AND 500 ORDER BY price ASC ect.
Should that be like this?
sprintf("SELECT * FROM products WHERE (Category LIKE %s OR products.Manufacturer LIKE %s OR products.Model LIKE %s OR products.Color LIKE %s AND Category!= 'Stage Pianos' AND Category!= 'Recent Pianos' AND Category!= 'Recent Keyboards)' AND price BETWEEN 0 AND 500 ORDER BY price ASC ect.

Similar Messages

  • Search Feature in Mail only partly works

    Good day,
    I have two questions today
    1. when I search for a specific sender in my mail for Mac software I doesn't find or rarely finds any of the received messages, basically the search feature FROM doesn't work. When I switch FROM to ALL it will only show my sent messages.
    Which setting can I update to fix this?
    2. What do I need to use if I wish to search for two words in Mail without seeing results for each individual word?
    Thank you very much :-)

    Quit Mail. Force quit if necessary.
    Back up all data before proceeding.
    Triple-click anywhere in the line below on this page to select it:
    ~/Library/Mail/V2/MailData
    Copy the selected text to the Clipboard by pressing the key combination command-C. In the Finder, select
              Go ▹ Go to Folder
    from the menu bar. Paste into the box that opens by pressing command-V, then press return.
    A folder window will open. Inside it there should be files with names as follows:
              Envelope Index
              ExternalUpdates.storedata
    Move those files to the Desktop, leaving the window open. Other files in the folder may have longer names that begin as above. Move those files, if any, to the Trash.
    Relaunch Mail. It should prompt you to re-import your messages. You may get a warning that the index is damaged and that Mail has to quit. Click OK. Typically, the process takes a few minutes, but it may take hours if you have gigantic mailboxes. In that case, you may be able to speed things up by temporarily adding your home folder to the Privacy list in the Spotlight preference pane. Remove it when Mail has finished importing.
    Test. If Mail now works as expected, you can delete the files you moved to the Desktop. Otherwise, post your results.

  • Synchronization only partly working

    Synchronization between my BB Storm and PC is only working for Calendar, and Contacts but not for Tasks or MemoPad.  I've checked the obvious - syncronization settings - but am getting the following untraceable (for me anyway) Error Message "Connector Specific Error".  Has anyone else experienced this or know of a way I can correct?
    Any help is much appreciated.   Thanks.

    Hi and Welcome to the Community!
    Depending on your specific circumstances, there are a number of public KBs available...I suggest you go here:
    http://btsc.webapps.blackberry.com/btsc/microsites/microsite.do
    and search on the error message...inspect the results to see which applies to you.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Yamaha RP-U200 only partly working under Leopard

    I had been cheerfully using my Yahaha RP-U200, a USB sound output device, for audio output on my macintosh under Tiger. It was recognized by the Sound Preference pane without problems. However, under Leopard, I find that only the sound input features of the unit are supported. It is no longer listed under the Sound Output part of the preference pane. Why was the support for the sound output for this unit removed from Leopard? Am I doing something wrong? Please advise how to correct this problem.

    You've posted this under the *Mac OS X Server* section of 10.5 discussions,
    and it's not at all clear why.
    You're likely to get more input (if not a solution) in the non-server section...http://discussions.apple.com/category.jspa?categoryID=235
    10.5 is a very different operating system, with no guarantees that your device will be supported.
    Did you do any testing or check Yamaha's site for info on 10.5 compatibility ?
    You might want to submit some feedback at
    www.apple.com/feedback
    and possibly call Apple support
    Best of luck with this !

  • Handoff/continuity only partly working

    I am trying to get handoff/continuity to work with my Macbook Pro 15" Retina (Mid 2012--2.3Ghz--8G Ram--256GB SSD/Yosemite 10.10.1 ) and iPhone 6 (4.7" 128GB Space Gray/iOS 8.1.1)
    I said partly because browser continuity works with browsing but it does not work with everything else.
    - When I open a webpage in IOS Safari, the left side of my MBPr's dock does show up that "continuity" icon Chrome/Safari and when I click on that, it does bring  me to the webpage I am checking on my iPhone.
    - When I open a webpage on my MBPr's Safari, a little Safari icon does show up on the downleft of my iPhone lock screen, I pull it up. It does bring me to the        webpage I was checking on my MBRr
    What does not work with Handoff/continuity
    - Mail (when I open Mail in MBPr, Mail doesn't show on the other device. Same applies to open Mail in iPhone)
    - Messages (When I open Messages in MBPr, Messages doesn't show on the other device. Same applies to open Messages in iPhone)
    - Incoming Call (When my iPhone have incoming call, doesn't have incoming call notification show on my MBPr screen)
    What I tried/made sure
    - Made sure both device have bluetooth turned on and both under the same WiFi network.
    - Both MBPr and iPhone installed the lastest version OS and all patches available from app store.
    - Both MBPr and iPhone signed in with the same iCloud ID
    - Both MBPr and iPhone enabled Handoff.
    - Uncheck "iPhone Celluar Call" in my MBPr's facetime
    - Turn off and on Handoff/Suggest APPs in my iPhone
    - Restart both MBPr and iPhone multiple times
    - Cleared MBPr PRAM
    - Verified and Repair disk permission in my MBPr
    - Enabled Text Message Forwarding
    - Able to see my iPhone's personal hotspot under MacOS Wifi pulldown menu.
    Anyone having the same issue and know how to tackle it? Thanks in advance.

    Hi Barney-15E,
    I was using that word to refer to the process of Enabling Text Forwarding in the Messages settings on the iPhone that triggers the Mac version to show a Code Number which needs entering in the next stage on the iPhone.
    8:20 PM      Tuesday; December 2, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Blackberry Maps only partly works; some features not working at all.

    I have a new Curve 9360 to replace an older Curve model. Used the BB Maps app a lot for driving directions, etc. while traveling. On my new one, the Maps app loads fine and shows my current location fine. But a couple critical functions don't work at all. Anyone help me out here?
    Get Directions
    When I select Get Directions, nothing happens.
    I should be able to enter Start and End locations, but the selection / entry screen fails to appear.
    Favourites
    When I select Favourites, nothing happens.
    I should be able to open my list of favourite locations, routes, etc., but the selection screen fails to appear.
    I've already tried removing and re-installing Maps - didn't help any. Any other ideas, thoughts, suggestions???
    Cheers!

    Well what are you expecting those keys to do? They have very limited functions in the OS and only some keys work for doing certain things in certain programs.
    That is one reason Apple and makers of Windows PC notebooks program them to do Add-On feature things like raising and lowering screen brightness or sound volume.
    You can Program the function keys to do certain things in the Keyboard Applet under the Keyboard Shorcuts tab. But most built in functions using the function keys also use another modifier key like the Command/Apple key and the Option/Alt key or the Shift key.

  • My wifi connection only partly works?

    I am currently connected to a wifi network at an office building.  I can connect fine but for some reason facebook chat and notifications will not load.  Is there a reason for it?  And my facebook will let me login on chrome, but it won't let me login on safari?  I really don't understand why and I could really ues some help.
    Thanks!

    i sometimes have the same problem. when you connect to wifi at any place like when you go to starbucks or whatever, they can set up who can use what and they can select if you need a password to connect and use there wifi. and they can do the same thing for what people can use. and sometimes they only allow you to use certain things when you are connected to it. i dont think you can really do anything about connecting to facebook and your network at your office building maybe really crappy also. hope it helps:)

  • Packaging issue with PDF only - EPUB works

    Has anyone seen this while using the packager service on a PDF?
         java.lang.NoClassDefFoundError: Could not initialize class com.adobe.adept.packaging.pdf.
    Everything else seems to be working very well, all services running and test ok, EPUB packaging works ok, etc. The class file is there, and otherwise the packager seems to be working.
    Tomcat6 / Linux / java version "1.6.0_20"

    Here's more info - it seems to appear in the log earler, the PDFPackager doesn't init due to JsafeJCE init failing:
    Caused by: java.lang.SecurityException: JsafeJCE provider self-integrity check failed
         at com.rsa.jsafe.provider.JsafeJCE.<init>(Unknown Source)
         at com.adobe.adept.packaging.pdf.PDFPackager.<clinit>(PDFPackager.java:73)
    I've determined that the jsafeJCE.jar is a signed JAR, and the certificate is out of date.
    I tried to install a more recent jsafeJCE.jar from the EMC/RSA project, but that just apparently masked the error. I think the root cause is in fact the signed JAR certificate has expired.
    Any advice on either:
    a) Getting an updated jsafeJCE.jar that has a valid signature, or
    b) Configuring Tomcat/Java to consider an out of date signing certificate as OK (eg, relax this requirement)
    Thx -

  • SharePoint 2013 List View with query string filter stops working after editing view from browser

    I have created one list definition in which I have added one list view which will filter data from query string paramater
    So when I am creating list from my list definition, view with query string filter is working fine.
    But when I am modifying view from UI(I am not changing any thing , just opening "Modify View" page and then click on "Save" button), view gets stop working means it's not filtering data based on query string
    Any suggestion what I am missing?
    Below is my list view schema
    <View BaseViewID="11" Type="HTML" TabularView="FALSE" WebPartZoneID="Main" DisplayName="$Resources:OIPLBScoreCard,viewFilterTasksByTarget;" MobileView="True" MobileDefaultView="False" Url="FilteredTasks.aspx" SetupPath="pages\viewpage.aspx" DefaultView="FALSE" ImageUrl="/_layouts/15/images/issuelst.png?rev=23">
    <Toolbar Type="Standard" />
    <ParameterBindings>
    <ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
    <ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" />
    <ParameterBinding Name="TargetId" Location="QueryString(TargetId)" />
    </ParameterBindings>
    <JSLink>hierarchytaskslist.js</JSLink>
    <XslLink Default="TRUE">main.xsl</XslLink>
    <JSLink>clienttemplates.js</JSLink>
    <RowLimit Paged="TRUE">100</RowLimit>
    <ViewFields>
    <FieldRef Name="Body"></FieldRef>
    <FieldRef Name="Title"></FieldRef>
    <FieldRef Name="StartDate"></FieldRef>
    <FieldRef Name="DueDate"></FieldRef>
    </ViewFields>
    <ViewData>
    <FieldRef Name="PercentComplete" Type="StrikeThroughPercentComplete"></FieldRef>
    <FieldRef Name="DueDate" Type="TimelineDueDate"></FieldRef>
    </ViewData>
    <Query>
    <Where>
    <Eq>
    <FieldRef Name="oipscTargetLookup" LookupId="TRUE"/>
    <Value Type="Lookup">{TargetId}</Value>
    </Eq>
    </Where>
    </Query>
    </View>
    I have one lookup field from "Target List" in my source list and I want to filter data based on that lookup field.

    Hi JayJT,
    The Miscellaneous is located in the contact list that you used for the connection.
    So , you need to edit the page, then edit the contact list that you used, in the web part properties of the contact list, you will find Miscellaneous, then expand it and select ‘Server Render’ .
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • My MacBook Pro with Lion 10.7.2, only audio on the headset, and speaker mute. With Windows, the audio works in speaker and headphone jack. What is the problem? What's the solution?

    My MacBook Pro with Lion 10.7.2, only audio on the headset, and speaker mute. With Windows, the audio works in speaker and headphone jack. What is the problem? What's the solution?

    There is probably a red light on inside your headphone port, indicating that the analog/digital switch in there is stuck in the digital position. Insert a headphone plug and wigle it around, especially in the horizontal plane, as you insert and remove it several times. This will usually unstick the switch and restore normal operation. If it doesn't, the machine will need to be repaired.
    This has been a fairly common problem, but in most cases it is easily cured as described above.

  • How to display LOV on web in ENTER-QUERY mode with form or block query only.

    Hello all
    How can I display lov automatic on the web in from enter-query
    mode in form or block query only mode.
    thankx

    If I understand correctly your explanation, your called form
    fails to activate the LOV in enter-query mode when it is deployed
    and test on the browser.
    So lets proceeed like this, to make it work in all environments,
    let us programetically activate the LOV.
    HOW?
    In the called form, write in the WHEN-NEW-ITEM-INSTANCE TRIGGER
    at block level (if have more than one LOV)
    IF :SYSTEM.MODE = 'ENTER-QUERY' THEN
    IF get_item_property(:system.cursor_item,lov_name) IN ('YOUR
    LOV1', 'LOV2' etc) THEN
    IF SHOW_LOV(get_item_property(:system.cursor_item,lov_name))
    THEN
    NULL;
    END IF;
    END IF;
    END IF;
    The above code maybe tweak to suite your need and condition.
    This way, we explicitly make the LOV appear in ENTER-QUERY mode
    whenever the user clicks on an item with an attached LOV.
    Hope this helps.
    Mohammed R.Qurashi

  • Issues with Content Query Web Part List Override

    I have modified a Content Query web part to show all checked out documents across my site collection. I used this property to get the checked out documents:
    <property name="QueryOverride" type="string"><![CDATA[<Where><Geq><FieldRef Name="CheckoutUser" LookupId="TRUE"/><Value Type="int">0</Value></Geq></Where><OrderBy><FieldRef
    Name="CheckoutUser"/></OrderBy>]]></property>
    It fails when trying to view across the site collection and gives this error:
    "There is a problem with the query that this webpart is issuing. Check the configuration of this webpart and try again."
    However, it works for sub-sites.
    Thus, I followed this blog to modify the ListsOverride property: http://geekswithblogs.net/simonh/archive/2013/05/08/increasing-the-number-of-lists-a-content-query-webpart-can.aspx I modified the property to:
    <property name="ListsOverride" type="string"><![CDATA[<Lists Servertemplate="101" MaxListLimit="2000"></Lists>]]></property>
    But now I am getting this response:
    This query has returned no items. To configure the query for this Web Part, open the tool pane.
    Can anyone tell me what the problem is? I cannot find anything in the ULS logs that would indicate a timeout from the SQL server or any other type of error.

    Hi Susan,
    According to your description, my understanding is that there is something wrong when you override content query web part property.
    As you said, the query override works for sub-site, I suggest you check the data in the parent site whether the data is valid.
    Here are some detailed articles for your reference:
    http://rmanimaran.wordpress.com/2010/10/19/getfind-all-checked-out-documents-from-a-document-library-using-caml/
    http://msdn.microsoft.com/en-us/library/office/aa981241(v=office.14).aspx
    Best Regards
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Zhengyu Guo
    TechNet Community Support

  • Ipod 4 with IOs6 only shows a few parts of my mediathek

    Hi, my new Ipod 4 with IOs6 only shows a few parts of all contend of my mediathek by network access (musicapp).
    With remote all is shown, IPhone 4 (IOS5) can see all the Music and works perfectly on th same Itunes PC.
    Is this an issue of IOs6?

    I have this problem too and the only thing that seems to help is to re-import the CD into iTunes. It corrected the problem. I only seem to have the problem with CDs that I imported into iTunes mysel--not purchased music. Make sure that you click replace so that you don't have the same CD twice in your library.

  • Only part of my click box works

    I've created a file using Captivate 3. This file contains a
    number of click boxes. Most of them work just fine. However, on one
    slide I have a click box, and only part of it works. When I publish
    the file, my cursor turns to a hand when I mouse over the click
    box. However, I can only click on about half of the area that is
    supposed to be a click box.
    I've tried:
    -Deleting and recreating the click box.
    -Copying and pasting a click box that works onto the slide
    that doesn't work
    -Deleting the slide and recreating the slide.
    However, none of these things seem to be working. Has anyone
    else experienced this? Any work arounds?

    I tried recreating your issue even with multiple clickboxes
    at various points on the timeline, and I cannot recreate it. Even
    if the 1st clickbox is the dead last layer with many objects above
    it, I can still get a hand and click all of it.
    The only thing I can think of is if you have imported a .swf
    that may have some script that is interfering, but you do not
    mention that you have done so.
    As a really goofy work-around, perhaps double the size of the
    clickbox to see if "half" of it will land it in your target
    range.

  • Content query web part is not working after chaning the DNS entry

    Hi all,
    We have a content query web part in the sharepoint site but it is not working after changing the DNS Entry for the web site ipaddress from one server to other . But it is working fine on the server, if we try to access the site from other system content
    quey server its not working fine and its giving error message as bellow.
    Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.
    Can anyone help me to fix this issue please.

    I have custom XSLT . But it is working fine before changing the dns entry as soon as we change the DNS entry the content quey web part is not working. I tried to delete the content query web part and add it once again to the page, As soon as content query
    web part is added to the page the fallowing error message is displayed.
    Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.
    Can anyone help me to fix this issue please.

Maybe you are looking for

  • Cannot connect to cellular network after 6.1.2 upgrade

    I just upgraded my iPhone 5 to 6.1.2 this morning via an over-the-air update on my WiFi network. The upgrade appears to have been successful, however, it can no longer connect to the Verizon cellular network. I tried restarting the device, but no luc

  • XSLT transformation not working in 1.5 (but was in 1.4)

    Gentlemen, I have a problem with some code that worked fine under 1.4 (at least up to 1.4.2_06), but now no longer works under 1.5.0 (I know this isn't the most recent, but I have yet to update). I use the following XSL template in order to take a st

  • Lync 2013 Client install failure

    Hi We're having trouble installing the Lync 2013 standalone client via SCCM on a couple of PCs.  It is installing with no problem on most PCs.   However, on some PCs, it installs and when you launch it you get the message... "Microsoft Lync has stopp

  • App for Epson V750 Pro

    I recently installed Mavericks OSx on my iMac; I am now unable to use my Epson750 scanner and apparently need a new app. I have to do this urgently. I don't expect to have to pay for it either. Also:  having previously setup connection to my HPdeskto

  • Computer stuck at apple icon in startup

    I started my computer, allowed the updates, was told to restart. Now I can't. (Have a Mac Os X 10.4) Upon powering up the apple logo appears and the circular bars turn but it own't advance to the log-in box. Please help!