Sets the data argument for an insert or update statement and is called directly from the objSQL class.
void obj_data ( array table )
<?php
try
{
$dbh->obj_table( "mytable" );
$dbh->obj_data( array( "product" => "balloon",
"color" => "red",
"size" => "small",
"price" => 2.50 ) );
$rs = $dbh->obj_insert();
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_cols, obj_limit, obj_offset, obj_order_by, obj_sort_order, obj_table, obj_where