i have this query
public function getGameHomes_limit($page,$limit){
$query = sprintf('SELECT %1$sserver_homes.*,%1$sremote_servers.*, %1$sconfig_homes.*
FROM `%1$sserver_homes` NATURAL JOIN `%1$sconfig_homes` NATURAL JOIN `%1$sremote_servers`; ',
$this->table_prefix);
return $this->listQuery($query);
}
and i need to set LIMIT
public function getGameHomes_limit($page,$limit){
$query = sprintf('SELECT %1$sserver_homes.*,%1$sremote_servers.*, %1$sconfig_homes.*
FROM `%1$sserver_homes` LIMIT '.$page.','.$limit.' NATURAL JOIN `%1$sconfig_homes` NATURAL JOIN `%1$sremote_servers`; ',
$this->table_prefix);
return $this->listQuery($query);
}
but i have this error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NATURAL JOIN ogp_config_homes
NATURAL JOIN ogp_remote_servers
' at line 2