php - Why is sql only showing the most recent record? -


i'm total newbie sql. i'm trying pull through records correspond shop code, reason sql showing me recent. there code i'm using is

$currentshopid = 467; $sql = 'select events.shopid shopid, events.eventid eventid         db1.events events         events.shopid in ('.$currentshopid.')'; 

there 10 records shopid 467 showing recent one?

update: here code function

function loadsomeotherstuff($sids) {     $currentshopid = implode(',', $sids);      $sql = 'select events.shopid shopid, events.eventid eventid             db1.events events               events.centreid in (' . $currentshopid . ')';     $this->_db->setquery($sql);     $event = $this->_db->loadassoclist();     if (is_null($event)) {         throw new exception($this->_db->geterrormsg());     }      foreach($event $row) {         $this->_databysid[$row['shopid']]['events']['shop code']   = $row['shopid'];         $this->_databysid[$row['shopid']]['events']['events']   = $row['eventid'];     }  } 

add empty array show records

 $this->_databysid[$row['shopid']]['events']['events'][]   = $row['eventid']; 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -