The relevant code:Unknown column 'item' in 'field list'
Code: Select all
$result = mysql_query("SELECT $add_type " . "_name FROM t_" . "$add_type WHERE $obj_name = $add_type" . "_name") or die(mysql_error());
$add_type = "school";
SELECT school_name FROM t_school ...
I need to be able to append the _name and pre-pend(?) t_ so that this code can dynamically process inputs from a number of different types of forms.