I know how to select from a database, my question is i want to set a variable for a where clause in my query, so lets say select \* FROM Foo WHERE A = '$a', but the variable has not been set previously and is from the table i am trying to select from.
So how would i do this. 

PHP 

```
 $FC_ID = mysqli_real_escape_string($dbc,[]);
 $FOOD_sel = $dbc->query("SELECT * FROM Food_Cat WHERE Food_Cat_ID = '$FC_ID'");

```

That is how far i have got so far.