Somepotato

Untitled

Apr 13th, 2015
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.26 KB | None | 0 0
  1. class Ship {
  2.     function __construct( $id ){
  3.         $theShip = Database::SingleQuery( "SELECT * FROM ships WHERE id = %1", $id );
  4.         foreach ($theShip as $key => $value) {
  5.             $this->$key = $value;
  6.         }
  7.     }
  8.     public function getSystem(){
  9.         return $this->system;
  10.     }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment