Skip to content

Commit

Permalink
Backport changes
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed Mar 28, 2023
1 parent d0e52e0 commit 207e465
Show file tree
Hide file tree
Showing 2 changed files with 588 additions and 77 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public function __construct( $pdo ) {
'dayofmonth' => 'dayofmonth',
'unix_timestamp' => 'unix_timestamp',
'now' => 'now',
'char_length' => 'char_length',
'md5' => 'md5',
'curdate' => 'curdate',
'rand' => 'rand',
Expand Down Expand Up @@ -135,17 +134,6 @@ public function curdate() {
return gmdate( 'Y-m-d' );
}

/**
* Method to emulate MySQL CHAR_LENGTH() function.
*
* @param string $field The string to be measured.
*
* @return int unsigned integer for the length of the argument.
*/
public function char_length( $field ) {
return strlen( $field );
}

/**
* Method to emulate MySQL MD5() function.
*
Expand Down Expand Up @@ -574,7 +562,7 @@ public function log() {
public function least() {
$arg_list = func_get_args();

return "min($arg_list)";
return min( $arg_list );
}

/**
Expand All @@ -587,7 +575,7 @@ public function least() {
public function greatest() {
$arg_list = func_get_args();

return "max($arg_list)";
return max( $arg_list );
}

/**
Expand Down
Loading

0 comments on commit 207e465

Please sign in to comment.