ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Making rownum (Oracle) in MySQL does not work

March 21, 2009 10:55pm

Subscribe [1]
  • #1 / Mar 21, 2009 10:55pm

    Jamey

    1 posts

    How can I get a SET command work in CI?

    $sql = 'SET @rownum := 0; SELECT @rownum := @rownum+1 AS rownum, EquipmentID, EquipmentType FROM Equipment';
    
    $query = $this->db->query($sql);
    
    foreach ($query-result() as $row)
    {
        echo $row->rownum; // this will not exist???
    }
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases