|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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. |
|
#3
|
|||
|
|||
|
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 |
|
#4
|
|||
|
|||
|
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 |
|
#5
|
|||
|
|||
|
Apologies
Ok, it seems that this comments engine rips out single quotes and makes the text a different style instead. Sorry.
|
|
#6
|
|||
|
|||
|
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 . |
|
#7
|
|||
|
|||
|
If you would like to see an article covering a particular topic, please post your request here.
|
![]() |
| Viewing: Dev Shed Forums > Other > Development Articles > Error Handling In PHP (part 1) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|