Is it possible to do something like this?
Variable = fname
Select Variable (where this would = fname) From Table
?
$a = "fname";
SELECT $a FROM table;
would select column "fname" from table.