<?php namespace App\Models;

use Illuminate\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Model;

class adherents extends Sximo  {
	
	protected $table = 'foot_adherents';
	protected $primaryKey = 'id';

	public function __construct() {
		parent::__construct();
		
	}

	public static function querySelect(  ){
		
		return " SELECT foot_adherents.* FROM foot_adherents ";
	}	

	public static function queryWhere(  ){
		
		if(session('gid') == 8)
			return " WHERE foot_adherents.id IS NOT NULL AND foot_adherents.id_ligue ='".session('lid')."'";
		elseif (session('gid') == 9)
			return " WHERE foot_adherents.id IS NOT NULL AND foot_adherents.id_ligue ='".session('lid')."' AND foot_adherents.id_subligue ='".session('sli')."'";
		else
			return " WHERE foot_adherents.id IS NOT NULL ";
	}
	
	public static function queryGroup(){
		return "  ";
	}
	

}
