Executes a delete statement with minimal SQL markup and is called from the objSQL class.
mixed obj_delete ( str table[, str where ] )
Result resource/object or false on failure.
<?php
try
{
$rs = $dbh->obj_delete( "mytable", "dept='IT'" );
if ( $dbh->obj_error() )
throw new Exception( $dbh->obj_error_message() );
echo $rs->obj_affected_rows();
}
catch ( Exception $e )
{
//log error and/or redirect user to error page
}
?>
See also: obj_insert, obj_paging, obj_query, obj_select, obj_update