Why the following doesn't work?
$avalues = array();
$avalues[1] = $datavalue;
$sql = "UPDATE table SET fieldname = '$avalues[1]' ";
doupdate($sql);
function doupdate($sql);
global $avalues;
$result = mysql_query($sql);
....
// $result is ALWAYS false
// but WAIT!, when I place the $sql =... line
// inside the function it WORKS!,
WHY? I'm doing this?
I intend to have only one function per I/O transaction,
instead of writing one for each table,
If I'd had do this, then every time I want to change or test
a new method for I/O I'd have to change many functions,
so thew probability to have errors increase.