Two things are wrong. You use WHERE two times, you should use AND instead.
Also you are using LIKE on an integer field, while you only want to check if it is 0 or not, you should use = instead.
LIKE only works to search for text or large integers (at least I think so, never tried the last), preferably with wildcards for example:
$query = "SELECT * FROM `movies` WHERE title LIKE '%Matrix%'";
Try this instead:
$query = "SELECT * FROM `gzdata1` WHERE approval=0 AND ident='$trimmed'";