worldnews — 2012-04-21T12:14:07-04:00 — #1
Can one and if yes how can one write a Php MySQL command that tells Php
SELECT this command from MySQL
but if it takes more than 5 Seconds to get an answer from MySQL regarding this
SELECT then stop waiting for it and instead return 0 (or X) and go on to the
r937 — 2012-04-21T21:49:35-04:00 — #2
worldnews — 2012-04-21T22:02:18-04:00 — #3
Are you sure that the answer is NO!
I had read a few places online that there is a way to do this, but they were just not clear.
john_betong — 2012-04-22T00:13:01-04:00 — #4
Your question is far too general and would be better if you could give more details of your search.
If you are looking to search for a phrase then a method I have used:
split the phrase into a SEARCH array
loop through the search array and seek each word
- if found then add to a FOUND array
repeat until endof SEARCH array
display results of FOUND array
worldnews — 2012-04-23T11:00:28-04:00 — #5
Thanks for your suggestions.
But the issue is not that simple.
And really only away around it is if Php MySQL had a command which would allow for a certain
amount of time of a wait for an answer to come back and if none has come back in that X time
then for that SELECT to abort and move on to the next command (line), rather than hang the
whole program when a given server does not respond to a SELECT command.
r937 — 2012-04-23T11:52:40-04:00 — #6
i think he must have been trying to reply to some other thread
john_betong — 2012-04-24T00:18:07-04:00 — #7
Actually I was not replying to another thread and still maintain that a query should be simplified and the results used to create a more complex query.
I would still like to know further details of the failed query that requires aborting after 5 seconds.
mittineague — 2014-09-23T18:48:23-04:00 — #8
This topic is now archived. It is frozen and cannot be changed in any way.