prepare( 'localeArrStmt', 'SELECT '.$q.$lang.$q.','.$q.\SYSTEM\DBD\locale_string::FIELD_ID.$q.' FROM '.(\SYSTEM\system::isSystemDbInfoPG() ? \SYSTEM\DBD\locale_string::NAME_PG : \SYSTEM\DBD\locale_string::NAME_MYS).' WHERE '.$where, $request); $result = array(); while($r = $res->next()){ $result[$r[\SYSTEM\DBD\locale_string::FIELD_ID]] = $r[$lang];} return $result; } else if(\intval($request)){ $cat = \intval($request); $con = new \SYSTEM\DB\Connection( \SYSTEM\system::getSystemDBInfo()); $res = $con->prepare( 'localeStmt', 'SELECT '.$q.$lang.$q.','.$q.\SYSTEM\DBD\locale_string::FIELD_ID.$q.' FROM '.(\SYSTEM\system::isSystemDbInfoPG() ? \SYSTEM\DBD\locale_string::NAME_PG : \SYSTEM\DBD\locale_string::NAME_MYS).' WHERE '.\SYSTEM\DBD\locale_string::FIELD_CATEGORY.' = '.(\SYSTEM\system::isSystemDbInfoPG() ? '$1' : '?').';', array($cat)); $result = array(); while($r = $res->next()){ $result[$r[\SYSTEM\DBD\locale_string::FIELD_ID]] = $r[$lang];} return $result; } throw new \Exception("Could not understand given request: ".$request); } }