I would like to have various option to change $this_var that contain different fieldname such as 'apple'=1 or 'orange'=1, is it possible?
$statement->prepare(SELECT * table WHERE $this_var = 1);
I would like to have various option to change $this_var that contain different fieldname such as 'apple'=1 or 'orange'=1, is it possible?
$statement->prepare(SELECT * table WHERE $this_var = 1);
Given
$this_var = 'apple';
$statement->prepare("SELECT * table WHERE $this_var = 1");
the query would be SELECT * table WHERE apple = 1;