The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Other
> Development Articles
|
Error Handling In PHP (part 1)
Discuss Error Handling In PHP (part 1) in the Development Articles forum on Dev Shed. Error Handling In PHP (part 1) Development Articles forum discussing articles and tutorials located at http://www.devshed.com. See what our authors have created for your viewing pleasure.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

March 30th, 2002, 12:04 PM
|
|
Junior Member
|
|
Join Date: Feb 2002
Location: germany
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Good piece of information
Pretty good article - though I knew about most of the features of error handling it was really good to read this article as it took the problems back in my mind and gave an interessting overview. I'm really looking forward to the second part;)
regards,
flim
|

May 16th, 2002, 01:53 PM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
Irony
In page 3:
http://www.devshed.com/Server_Side/PHP/ErrorHandling/ErrorHandling1/page3.html
There is a typo in the 2nd last text:
<?php
// set error-reporting to only fatal errors
error_reporting(E_ERROR);
// string
$string = "Mary had a little lamb";
// attempt to join() this string
// this will generate an E_WARNING
// because the second argument to join() must be an array join('',
$string);
// since this is a non-fatal error
// this statement should be executed
echo "-- end --";
?>
There should be a line break at the comments where half of the join function gets commented.
|

January 16th, 2003, 12:23 PM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
error
Read your article. I get MySQL result resource error when trying to execute "
$query="UPDATE $dbtable SET companyname='$companyname', address='$address', city='$city', state='$state',
zipcode='$zipcode', countrycode='$countrycode', companyphone='$companyphone', contactperson='$contactperson',
contactphone='$contactphone', companyIP='$companyIP', catalogIP='$catalogIP', companyemail='$companyemail',
contactemail='$contactemail', logo='$logo' WHERE recnum='$recnum'";
which appears to be ok symatically.
using error trap causes my form to go
blank.
Can you suggest resolution?
I also notice you make call mysql_query($query, $db) but my ver4 php barfs with
the $db. ???
Thanks
Bruce
|

April 16th, 2003, 05:14 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
re: error
SQL queries will not work unless all text fields are enclosed in quotes. ie:
$query = "UPDATE $dbtable SET companyname = '$companyname', address = '$address', ..."
Number fields don't need quotes, and inserting NULL doesn't need quotes. In fact if you use quotes NULL won't work properly.
Hope that helped. Dom
|

April 16th, 2003, 05:16 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
Apologies
Ok, it seems that this comments engine rips out single quotes and makes the text a different style instead. Sorry.
|

May 27th, 2003, 11:36 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
Error Handling In PHP (part 1)
Error Handling In PHP \(part 1\)
So you've seen those ugly messages PHP pops up whenever there's an error in your code. And perhaps you've wondered if there's a way to turn them off, or capture and handle them at the application layer. Well, there is - and this article has all the details.
Please discuss this article in this thread. You can read the article here .
|

May 28th, 2003, 09:28 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
If you would like to see an article covering a particular topic, please post your request here.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|