Tries to insert a negative value into columns defined as unsigned.
$table_name: The table to insert
$column_name: The column to insert
TRUE if the insert succeeded, FALSE otherwise
function tryUnsignedInsert($table_name, $column_name) {
try {
db_insert($table_name)
->fields(array(
$column_name => -1,
))
->execute();
return TRUE;
} catch (Exception $e) {
return FALSE;
}
}