small function
Posted: Thu Aug 31, 2006 3:38 am
I wrote a small function for queries:
How would i change that so that the last line would change depending on what $name was?
So if name was test it would be
Code: Select all
function db_query($sql, $name)
{
$string = $sql;
global $query;
$query = mysql_query($string) or die("Query($name): $string Failed".mysql_error());
}So if name was test it would be
Code: Select all
$test = mysql_query($string) or die("Query($name): $string Failed".mysql_error());