<?php

class WebServicesMod extends DbMod{
	var $VarTableWebServicesTypes = array('integer', 'text', 'text');	
	
	function WebServicesMod($ArrMsSp){
		parent::__construct($ArrMsSp);
		return true;
	}

  function GetFromDb($VarSqlName = 'SqlAll', $VarSqlGet = 'GetAll', $VarWhere = '', $VarOrder = '', $VarLimit = '', $VarJoinOn = ''){
    $ArrSqlArray['SqlAll']['select'] = 't1.webservices_id, t1.webservices_name, t1.webservices_session, t2.users_id';
    $ArrSqlArray['SqlAll']['from'] = $this->VarTableWebServices .' AS t1';
    $ArrSqlArray['SqlAll']['leftjoin'] =  $this->VarTableUsersServices .' AS t2 ON t1.webservices_id = t2.webservices_id';
    if('' != $VarJoinOn){
      $ArrSqlArray['SqlAll']['leftjoin'] .= ' AND '. $VarJoinOn;
    }
    if('' != $VarWhere){
      $ArrSqlArray['SqlAll']['where'] = $VarWhere;
    }
    if('' != $VarOrder){
      $ArrSqlArray['SqlAll']['order'] = $VarOrder;
    }
    if('' != $VarLimit){
      $ArrSqlArray['SqlAll']['limit'] = $VarLimit;
    }
    $ArrResult = $this->DbGet($ArrSqlArray[$VarSqlName], $VarSqlGet);
  	return $ArrResult;
	}
}
?>