For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > December 2004 > Handling DB query errors









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Handling DB query errors
Todd Cary

2004-12-24, 3:55 pm

I am not sure about how to properly handle DB Query errors. Here is a
typical query where the possible is NOT handled. Any suggestions are
welcomed e.g. how to code the query; how to have an error page; how to
handle errors produced by the Interbase server.

/* Get member data */
function db_get_member_data($dbh, $member_id) {
$stmnt = "SELECT * FROM Member WHERE MEM_MEM_ID='" . $member_id . "'";
$sthdl = ibase_query($stmnt,$dbh);
return $sthdl;
}

Todd
--
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com