first commit

This commit is contained in:
2023-09-12 21:41:04 +02:00
commit 3361a7f053
13284 changed files with 2116755 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace WPML\TM\Jobs\Query;
use \WPML_TM_Jobs_Search_Params;
class LimitQueryHelper {
/**
* @param WPML_TM_Jobs_Search_Params $params
*
* @return string
*/
public function get_limit( WPML_TM_Jobs_Search_Params $params ) {
$result = '';
if ( $params->get_limit() ) {
if ( $params->get_offset() ) {
$result = sprintf( 'LIMIT %d, %d', $params->get_offset(), $params->get_limit() );
} else {
$result = sprintf( 'LIMIT %d', $params->get_limit() );
}
}
return $result;
}
}