Aşağıdaki gibi sorguyu escape edip ekrana yazdırın hata nerede görelim.
echo $sorgu = "mysql_query(\"Select * from ....\")";