无法从mysql中删除(file.size)

First I inserted a new record into a database with a field file_size. It all works fine. Then I want to delete the record with a given name and size from the database. It works with name, but when I add AND statement it doesnt work.

$conn->query("DELETE FROM mytable WHERE name LIKE '%{$t}' AND file_size = '$file_size'"); 

file_size is passed through $file_size= $_POST['size']; and it works correctly. The number in the database and the one passed is the same. I have no idea why the above doesnt work...at first I thought that maybe these are different data types and hence I am comparing string with integer, but in Javascript it shouldnt matter...Any advice would be greately appreciated.

Maybe prepare request

$query=$conn->prepare("DELETE FROM mytable WHERE name LIKE :like_param AND file_size = :filesize");
$query->excute(array(':like_param' => '%'.$t, ':filesize' => $file_size));