could not load match phone in NPI.class.php SELECT npi_id, quicksearch.first_name, quicksearch.last_name, quicksearch_org.org_name, as ind_zip, as ind_city, quicksearch.state as ind_state, quicksearch.address as ind_address, quicksearch.fax as ind_fax, as org_zip, as org_city, quicksearch_org.state as org_state, quicksearch_org.address as org_address, quicksearch_org.fax as org_fax FROM npi.npi_to_number LEFT JOIN quicksearch on quicksearch.npi = npi_to_number.npi_id LEFT JOIN quicksearch_org on quicksearch_org.npi = npi_to_number.npi_id WHERE `number_id` = AND npi_to_number.npi_id != 1801833082 GROUP BY npi_id You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND npi_to_number.npi_id != 1801833082 GROUP BY npi_id' at line 20