mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-21 05:48:41 +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
|
||||
{
|
||||
$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->execute();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user