title: Is there a way to pass arguments to a query in CodeIgniter *without* using ActiveRecord?
body: <p>This is what I'd like to do, but it doesn't seem possible:
  (edit: changed single to double quotes)</p>
  
  <pre><code>function get_archives($limit, $offset) 
  {
      $query = $this-&gt;db-&gt;query("
          SELECT  archivalie.id, 
                  archivalie.signature, 
                  type_of_source.description AS type_of_source_description, 
                  media_type.description AS media_type_description,
                  origin.description AS origin_description
  
          FROM    archivalie, 
                  type_of_source, 
                  media_type,
                  origin
  
          WHERE   archivalie.type_of_source_id = type_of_source.id                                                        
          AND     type_of_source.media_type_id = media_type.id  
          AND     archivalie.origin_id = origin.id                                                                     
  
          ORDER BY    archivalie.id ASC
          LIMIT       $limit, $offset
      "); 
  
  
      // etc...
  
  }
  </code></pre>
  
  <p>It gives this error:
  (edit: new error message using double quotes, and with an offset number passed in the URL)</p>
  
  <pre><code>ERROR: LIMIT #,# syntax is not supported HINT: Use separate LIMIT and OFFSET clauses.
  </code></pre>
  
  <p>It only works if you pass the variables using the ActiveRecord format:</p>
  
  <pre><code>$this-&gt;db-&gt;select('archivalie.id, archivalie.signature, etc, etc');
  // from, where, etc.
  $this-&gt;db-&gt;limit($limit, $offset);        
  $query = $this-&gt;db-&gt;get();
  </code></pre>