public static function countWhere (string $column, array $operatorValue, string $joinOperator="AND") : int
	{
		$joinOperator 	= static::validateOperator($joinOperator, "AND");
		$expression 	= static::generateValue($column, $operatorValue, $joinOperator);
		$sqlQuery  		= "SELECT COUNT(*) as count FROM ".static::$tableName." WHERE {$column} {$expression}";
		$resultSet 		= Database::getInstance()->query($sqlQuery);
		$row 			= Database::fetchAssoc($resultSet);
		return (int) array_shift($row);
	}
public static function countWhere (string $column, array $operatorValue, string $joinOperator="AND") : int
	{
		$joinOperator 	= static::validateOperator($joinOperator, "AND");
		$expression 	= static::generateValue($column, $operatorValue, $joinOperator);
		$sqlQuery  		= "SELECT COUNT(*) as count FROM ".static::$tableName." WHERE {$column} {$expression}";
		$resultSet 		= Database::getInstance()->query($sqlQuery);
		$row 			= Database::fetchAssoc($resultSet);
		return (int) array_shift($row);
	}
public static function countWhere ( string $ column , array $ operatorValue , string $ joinOperator = "AND" ) : int { $ joinOperator = static :: validateOperator ( $ joinOperator , "AND" ) ; $ expression = static :: generateValue ( $ column , $ operatorValue , $ joinOperator ) ; $ sqlQuery = "SELECT COUNT(*) as count FROM " . static :: $ tableName . " WHERE {$column} {$expression}" ; $ resultSet = Database :: getInstance ( ) -> query ( $ sqlQuery ) ; $ row = Database :: fetchAssoc ( $ resultSet ) ; return ( int ) array_shift ( $ row ) ; }
Count where a given column is equal to a given value
@param string $column
@param array $operatorValue
@param string $joinOperator
@return int
Count where a given column is equal to a given value