Welcome Guest, Not a member yet? Register   Sign In
Database transaction error handling
#2

you could write your own library/helper for $res that takes the $db and $sql as arguments and returns either the results set if successful or the error number and message if not.

you would then call it with something like

if $res($conn,$sql)->success == true {
Do some neat stuff here
} else {
error handling goes here
}
Reply


Messages In This Thread
RE: Database transaction error handling - by obiron - 02-24-2015, 08:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB