CI - kontrola query - num_rows()

PHOTO EMBED

Fri Apr 22 2022 18:51:59 GMT+0000 (UTC)

Saved by @Mibit #ci #mysql #portal

$select = "SELECT * FROM tsv_sablonah WHERE sablona_id = '".(int)$sablona."'";
        
if($this->db->query($select)->num_rows() > 0 ){
  	return $this->db->query($select)->row();
} else {
  	return '';
}
content_copyCOPY