Making a function for selecting from MySQL, how is mine?
Posted
by Doug
on Stack Overflow
See other posts from Stack Overflow
or by Doug
Published on 2010-04-17T19:50:44Z
Indexed on
2010/04/17
19:53 UTC
Read the original article
Hit count: 179
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());}
© Stack Overflow or respective owner