Author Topic: how to stop it  (Read 384 times)

0 Members and 1 Guest are viewing this topic.

Offline angel777Topic starter

  • Enthusiast
  • Posts: 67
    • View Profile
how to stop it
« on: June 30, 2009, 02:03:54 AM »
hi is there a way to stop a select query while it is processing?
My user always felt annoying to wait for the loading process after they selected the wrong search filter combination.

 i am thinking to allow user to cancel the searching process if they do not want to continue.
any help will be greatful

Offline corbin

  • Guru
  • Freak!
  • *
  • Posts: 7,951
  • Gender: Male
    • View Profile
Re: how to stop it
« Reply #1 on: June 30, 2009, 03:42:15 AM »
Err...  You're searching queries shouldn't take that long...


And no, there's not a way to cancel a SELECT query....  Well, not gracefully.
Why doesn't anyone ever say hi, hey, or whad up world?

Offline angel777Topic starter

  • Enthusiast
  • Posts: 67
    • View Profile
Re: how to stop it
« Reply #2 on: June 30, 2009, 03:53:34 AM »
hi, my query time actually is fine.
what i provides user is the 4 listbox which they are able to filter out the query as they want.
However, if user accidentally chooses the value like Select all from Site, select all from customers, select all from employees.. then nightmare comes.
how do i stop it ?

Offline fenway

  • MySQL Si-Fu / PHP Resident Alien
  • Global Moderator
  • 'Mind Boggling!'
  • *
  • Posts: 15,443
  • Gender: Male
    • View Profile
Re: how to stop it
« Reply #3 on: June 30, 2009, 03:51:18 PM »
I don't see any sample queries, so I have no idea.
:anim_rules: Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

Offline Maq

  • Global Moderator
  • 'Insane!'
  • *
  • Posts: 11,003
  • Gender: Male
    • View Profile
    • Top Ecigs Reviews
Re: how to stop it
« Reply #4 on: June 30, 2009, 03:53:23 PM »
hi, my query time actually is fine.
what i provides user is the 4 listbox which they are able to filter out the query as they want.
However, if user accidentally chooses the value like Select all from Site, select all from customers, select all from employees.. then nightmare comes.
how do i stop it ?

It's your job to prevent that.  Why do you even allow such combinations?
Electronic Cigarette Reviews - Smoking alternatives, find YOUR ecig!
ini_set ("display_errors""1");
error_reporting(E_ALL);

Offline corbin

  • Guru
  • Freak!
  • *
  • Posts: 7,951
  • Gender: Male
    • View Profile
Re: how to stop it
« Reply #5 on: June 30, 2009, 04:38:07 PM »
Also, perhaps pagination should be used.
Why doesn't anyone ever say hi, hey, or whad up world?

Offline Ken2k7

  • Freak!
  • Posts: 5,174
    • View Profile
Re: how to stop it
« Reply #6 on: July 01, 2009, 03:14:57 AM »
There is KILL, but I don't know how to tie it into what you're doing. I agree with corbin. You may want to utilize pagination by selecting a limited amount of results per time.
Quote from: Slaytanist
A programmer who shys away from elegant tricks will never be more than competent at best. Ego and a desire to attempt the impossible are traits of most great coders.

Offline fenway

  • MySQL Si-Fu / PHP Resident Alien
  • Global Moderator
  • 'Mind Boggling!'
  • *
  • Posts: 15,443
  • Gender: Male
    • View Profile
Re: how to stop it
« Reply #7 on: July 01, 2009, 09:07:39 PM »
Likewise... set a hard limit on the number of records to be returned, and you're set.
:anim_rules: Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.