Making a function for selecting from MySQL, how is mine?
- by Doug
This is my first time. I will appreciate any thoughts, tips, and what not. How can I improve this? Ultimately, I don't want so many selects in my script.
function mysqlSelectCodes($table,
$where, $order, $limit) { $sql =
"SELECT * FROM $table WHERE $where
ORDER BY $order LIMIT $limit" or
die(mysql_error());
}