The first part is to retreive a specific value from a table. This works fine and returns what I want. In fact, with the constraints, it will only return ONE variable eg $array_variable[0]
Code: Select all
$array_variable = mysql_fetch_array(mysql_query("SELECT this_column FROM table WHERE this_row='$this_row' AND id='$id'"));Code: Select all
$new_variable = mysql_fetch_array(mysql_query("SELECT '$array_variable' FROM new_table WHERE this_row = '$this_row'"));But it's my example. See where '$array_variable' is the variable retreived from the first query but it needs to identify a column in the second query. If this works, it will retreive only ONE variable again. And thats what I need it to do.
So the big question is, can you use a variable to identify a column in a MySQL QUERY?
I hope I posted this right