Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


MySQL returns wrong results!

Posted on 2007-12-04
Medium Priority
Last Modified: 2013-12-12
I have a search and results page.  When I call the page in Firefox browser and enter a surname it returns the correct results. However, when I call the page in MS Internet Explorer it doesn't return my search term but returns all enteries in my MySQL database unsorted.  Does it have something to do with the differing urls as noted below and how they are translated by the browsers?

I noticed that Firefox the url string is:

In Internet Explorer the url string appears as:
Question by:geist62
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +2
LVL 28

Expert Comment

ID: 20408083
It has to be since you are doing an incomplete query.
LVL 21

Expert Comment

ID: 20408088
hi geist62,

in my FF and IE6 both searches results in the same URL and works without problems?

Author Comment

ID: 20408100
Any ideas why Internet Explorer would truncate the url?
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

LVL 28

Expert Comment

ID: 20408106
Do you have any space in the url?
LVL 25

Accepted Solution

imitchie earned 750 total points
ID: 20408394
That has to do with the way Firefox and IE differ when passing information from IMAGE form tags used for POST.
Firefox in this case (the version you have) is populating Button.X and Button.Y (position within button clicked) and Search=Search (the image/button clicked to cause the post).  IE does a default post action without any of these additional info

Author Comment

ID: 20408638
If this is a problems any idea how to fix it?  The odd thing is that somes Internet Explorer will consistantly return the correct results (with the full url) and then revert to returning the wrong results (partially formed url). Urggggh!
LVL 25

Expert Comment

ID: 20408664
It all depends on your javascript interaction. Hard to comment without seeing full code.  But I'm not into that, maybe someone can pick up from there.
LVL 29

Assisted Solution

fibo earned 750 total points
ID: 20412137
You might test the effect of assigning a value of "search" to the search button, so that you force the value to be passed on

Author Comment

ID: 20416258
Turns out the following code was the culprit:

Line 61 is:
if ((isset($_GET["Search_x"]) && $_GET["Search_x"] != "")) {

Code should be:
if ((isset($_GET["S_Surname"]) && $_GET["S_Surname"] != "")) {


Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question