The best way ...
regarding to what expectations?
The query doesn't succeed because...
- the host running the mysqldemon died?
- the mysqldemon died?
- your ISP died?
- the hard disk holding the database died?
- the disk holding the database run out of space?
- the disk holding the cache run out of space?
- the result set was to big?
- there was some sort of time out - (imaging all sort of time outs?)
- there was a problem (there will always be problems...)
- there was a bug (imaging all sort of bugs?)
- there was a php syntax error?
- there was a mysql syntax error?
- there was a mixed problem?
You ever heard of 'defensive coding'?
Think: All software is always befuddled with error...
Tell yourself and your audience something about
the problems your application is involved with.
Be friendly to your visitors...
don't : die ("Query failed!");
Jon Haworth wrote:
> What about:
> $sql = "SELECT something FROM table";
> $result = mysql_query($sql) or die ("Query failed!");
> do_something(); //the query has succeeded if we get to this line
Hans-Werner Guth S http://www.qits.de
QITS GmbH T mailto:[EMAIL PROTECTED]
Formerstr 53 I fon +49-2102-852-145
40878 Ratingen Q fax +49-2102-852-202
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]