How to add variable in the query as a column? [closed]

1

How do I add the $pesq variable as the column of a query (not search) query?

$pesq = mysqli_real_escape_string($dbcon , $_POST['pesq']);
$pesquisa = mysqli_real_escape_string($dbcon , $_POST['pesquisa']);
$sql = "SELECT * FROM tbcliente WHERE '$pesq' = '$pesquisa'";
    
asked by anonymous 06.07.2017 / 17:44

0 answers