I want to use a LIST command where the variables in the brackets are generated from a query. This is the code i used:
/GET A LIST OF FIELD NAMES/
$fields=mysql ("miniyo", "select fieldname from fieldlist where tableid='$tableid'");
$count=mysql_num_rows($fields);
$i=0;
/GENERATE LIST COMMAND/
$sql="list($";
while ($i<$count) {
list($fieldname) = mysql_fetch_row($fields);
$sql.=$fieldname;
$check=$count-1;
if ($i!=$check){
$sql.=", $";
}
$i3++;
}
$sql.=") = mysql_fetch_row($";
$sql.="tmp);";
Now the list command i want to use is stored in the variable '$sql.' How would I run that list command?
Adam