Advertisement
Guest User

Untitled

a guest
Dec 19th, 2011
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.47 KB | None | 0 0
  1. function savePerson( $person_id )
  2. {
  3.   $query = 'SELECT * FROM `person` WHERE person_id = '.$person_id.' LIMIT 1;';
  4.   if( !$person = $this->db->get( $query )
  5.   {
  6.     return false;
  7.   }
  8.  
  9.   $query = 'SELECT * FROM `person_'.$person['person_type'].' WHERE person_id = '.$person_id.' LIMIT 1;';
  10.   $person['data'] = $this->db->get( $query );
  11.  
  12.   $this->saveFile( 'person_'.$person_id, $person );
  13.  
  14.   return array
  15.   (
  16.      'person' => $person,
  17.      'time' => time()
  18.   );
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement