title: error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax
body: <p>I HAVE this query and error :</p>
  
  <blockquote>
    <p>error message :</p>
    
    <p>A Database Error Occurred</p>
    
    <p>Error Number: 1064</p>
    
    <p>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 'JOIN provinsi as provinsi ON provinsi.IDProvinsi =
    lokasi_wisata.IDP' at line 3
            select id_lw,judul_lw,left(deskripsi_lw,30)deskripsi_lw,latitude_lw,longitude_lw,
    nama_p,nama_k,status_lw,gambar_lw from lokasi_wisata ORDER BY id_lw
    ASC JOIN provinsi as provinsi ON provinsi.IDProvinsi =
    lokasi_wisata.IDProvinsi JOIN kabupaten as kabupaten ON
    kabupaten.IDKabupaten = lokasi_wisata.IDKabupaten where judul_lw like
    '%%' limit 0, 10
            Filename: C:/xampp/htdocs/mtma/application/models/pagination_model.php
            Line Number: 21</p>
  </blockquote>
  
  <p>query :</p>
  
  <pre><code> $sql = "select id_lw,judul_lw,left(deskripsi_lw,30)deskripsi_lw,latitude_lw,longitude_lw,
                  nama_p,nama_k,status_lw,gambar_lw
                  from lokasi_wisata ORDER BY id_lw ASC JOIN
                  provinsi as provinsi ON provinsi.IDProvinsi = lokasi_wisata.IDProvinsi JOIN
                  kabupaten as kabupaten ON kabupaten.IDKabupaten = lokasi_wisata.IDKabupaten where judul_lw like '%$st%' limit " . $start . ", " . $limit  ;
  </code></pre>