<?php
require_once(LIB_PATH . DS . 'database.php');

class State extends DatabaseObject
{
    protected static $table_name = "states";
    public $state_id;
    public $name;
    
    
    

   

    
    
public static function state_retriever(){
        global $database;
        //$lev = $database->escape_value($lev);

        $sql = "SELECT * FROM ".self::$table_name." order by name ";
         
 
         
       return $result_array = self::find_by_sql($sql);
        //return !empty($result_array) ? array_shift($result_array) : false;
//return $result_array;
  


    }



public static function state_lga($stateid=''){
        global $database;
        $sid = $database->escape_value($stateid);

        $sql = "SELECT * FROM local_governments ";
        
        $sql .=" WHERE state_id='{$sid}'";
         
 
         
       return $result_array = self::find_by_sql($sql);
        //return !empty($result_array) ? array_shift($result_array) : false;
//return $result_array;
  


    }


   
//Common database Methods

}
 $depart = new Depart();
?>