SELECT
species.speccode,
species.fbname,
species.genus,
species.species,
families.family,
species.demerspelag,
species.depthrangeshallowFROM (
(COUNTRY
INNER JOIN species
INNER JOIN stocks
ON species.speccode = stocks.speccode
)
ON country.speccode = species.speccode)
INNER JOIN families
ON species.famcode = families.famcode)
INNER JOIN countref
ON country.c_code = countref.c_code
WHERE stocks.envtemp = 'deep-water'
AND country.c_code = '608'
AND stocks.level IN ('species in general','subspecies in general')
Fatal error: Uncaught mysqli_sql_exception: 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 'INNER JOIN species
INNER JOIN stocks
ON species.speccode = s...' at line 10 in /var/www/html/country/CountrySearchList.php:103
Stack trace:
#0 /var/www/html/country/CountrySearchList.php(103): mysqli->query()
#1 /var/www/html/country/CountrySearchList.php(138): _unknown()
#2 {main}
thrown in /var/www/html/country/CountrySearchList.php on line 103