I wonder if there's any draw backs of creating few functions for simple MySQL operations like SELECT, INSERT, DELETE, UPDATE e.g.
function sql_select($table, $values, $condition='WHERE true', $limit='') {
global $sql_obj;
$select_query = "SELECT {$values} FROM {$table} WHERE {$condition} {$limit}";
$result = $sql_obj->run_query($select_query,"select");
return $result;
}
sql_select('user_table', 'name, address, phone', 'user_id = ' .mysql_real_escape_string($_POST["user_id"]), 'LIMIT 0, 1' );
above function can be upgraded a bit to allow more functionality. I know benefits of it, but any drawbacks?