Hi Forum,
I habe the following manual query:
public static function LoadArrayByLike ($strSuche, $strOrderBy = null, $strLimit = null, $objExpansionMap = null) {
// Call to ArrayQueryHelper to Get Database Object and Get SQL Clauses
Funktion::ArrayQueryHelper($strOrderBy, $strLimit, $strLimitPrefix, $strLimitSuffix, $strExpandSelect, $strExpandFrom, $objExpansionMap, $objDatabase);
// Properly Escape All Input Parameters using Database->SqlVariable()
//$strSuche = utf8_decode($objDatabase->SqlVariable($strSuche));
$strSuche = $objDatabase->SqlVariable($strSuche);
$strSuche = str_replace(“'”, '', $strSuche);
// Setup the SQL Query
$strQuery = sprintf('
SELECT
%s
`funktion`.`Funktion_Id` AS `Funktion_Id`,
`funktion`.`Titel` AS `Titel`,
`funktion`.`Name` AS `Name`,
`funktion`.`Vorname` AS `Vorname`,
`funktion`.`Beschreibung` AS `Beschreibung`,
`funktion`.`TelefonNr` AS `TelefonNr`,
`funktion`.`Raum` AS `Raum`,
`funktion`.`Orga_Id` AS `Orga_Id`,
`funktion`.`Pos` AS `Pos`,
`funktion`.`io_NST` AS `io_NST`,
`funktion`.`io_Anschluss` AS `io_Anschluss`,
`funktion`.`io_Benutzer` AS `io_Benutzer`,
`funktion`.`EMail` AS `EMail`,
`funktion`.`Fax` AS `Fax`,
`funktion`.`Mobil` AS `Mobil`
%s
FROM
`funktion` AS `funktion`
%s
WHERE Name LIKE %s OR Vorname LIKE %s
%s
%s', $strLimitPrefix, $strExpandSelect, $strExpandFrom,
“'%$strSuche%'”, “'%$strSuche%'”, $strOrderBy, $strLimitSuffix);
// Perform the Query and Instantiate the Result
//echo “query: $strQuery<br />”;
$objDbResult = $objDatabase->Query($strQuery);
QApplication::$Database[1]->OutputProfiling();
return Funktion::InstantiateDbResult($objDbResult);
}
All fields, excepts the with the underscore are retrieved properly, the fiels with the underscore are null.
How can I solve this problem? Or, is possible to rewrite it to QQN-Notation?
thank in advance
flunki