Update database.php

This commit is contained in:
Namhyeon Go 2020-01-08 22:06:14 +09:00 committed by GitHub
parent ed624a586f
commit a029d3baac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -450,7 +450,11 @@ if(!check_function_exists("get_bind_to_sql_where")) {
// set start prefix
$s3 = trim($s3);
$s3a = explode(" ", $s3);
$sp = ($s3a[0] == "and" ? "1" : "0");
if(in_array($s3a[0], array("and", "or"))) {
$sp = ($s3a[0] == "and" ? "1" : "0");
} else {
$sp = "1";
}
return sprintf("%s %s", $sp, $s3);
}