mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-10 22:18:40 +00:00
Prepare for array getRaw()
This commit is contained in:
parent
4fed8e5a46
commit
03d1073f2c
|
|
@ -1708,7 +1708,12 @@ class DataMapperAbstract implements DataMapperInterface
|
||||||
public static function getRaw($primaryKey) : array
|
public static function getRaw($primaryKey) : array
|
||||||
{
|
{
|
||||||
$query = self::getQuery();
|
$query = self::getQuery();
|
||||||
$query->where(static::$table . '.' . static::$primaryField, '=', $primaryKey);
|
|
||||||
|
if(is_array($primaryKey)) {
|
||||||
|
$query->where(static::$table . '.' . static::$primaryField, 'in', $primaryKey);
|
||||||
|
} else {
|
||||||
|
$query->where(static::$table . '.' . static::$primaryField, '=', $primaryKey);
|
||||||
|
}
|
||||||
|
|
||||||
$sth = self::$db->con->prepare($query->toSql());
|
$sth = self::$db->con->prepare($query->toSql());
|
||||||
$sth->execute();
|
$sth->execute();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user