Skip to content

Commit

Permalink
database
Browse files Browse the repository at this point in the history
  • Loading branch information
Shemona Singh authored and Shemona Singh committed Dec 1, 2017
1 parent 9ee081b commit c5d98ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions www/application/models/All_Tweets_Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ function getPosts(){
$this->db->select("first_name,last_name,username");
$this->db->from('Users');
$query = $this->db->get();
var_dump($query->result_array());
// return $query->result();
return $query->result_array();
}

}
Expand Down
8 changes: 4 additions & 4 deletions www/application/views/pages/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
</tr>
<?php foreach($posts as $post){?>
<tr>
<td><?php echo $post->first_name;?></td>
<td><?php echo $post->last_name;?></td>
</tr>
<?php }?>
<td><?php echo $post['first_name'];?></td>
<td><?php echo $post['last_name'];?></td>
</tr>
<?php }?>
</table>

</div>
Expand Down

0 comments on commit c5d98ca

Please sign in to comment.