[Solved] Empty query no matter what


You need to fix the backticks and quoting on your query. You have –

$sql=`SELECT * FROM PRICES WHERE TES LIKE "%" . $TES . "%" `;

It should be –

$sql="SELECT * FROM PRICES WHERE TES LIKE '%" . $TES . "%' ";

You should only have to check for a query error once which you do when you run the query, change this –

while($row=mysqli_fetch_array($result) or die(mysqli_error())){ 

to this –

while($row=mysqli_fetch_array($result)){ 

4

solved Empty query no matter what