$t3_typo_db_host
$t3_typo_db_host :
$log : \qfq\Log
doQuery(string $dbAlias, string $sql, array $result, $expect = ROW_REGULAR, string $merge = MERGE_NONE) : boolean
doQueryKeys: See doQuery Difference: fake Array for $keys
string | $dbAlias | |
string | $sql | |
array | $result | |
$expect | ||
string | $merge |
doQueryKeys(string $dbAlias, string $sql, array $result, array $keys, string $expect = ROW_REGULAR, string $merge = MERGE_NONE, integer $arrayMode = MYSQL_NUM) : boolean
doQueryKeys: fires a show, select, insert, update or delete and collects result.
insert, update and delete will produce a log entry. If: $expect==EXPECT_SQL_OR_STRING, '$sql' can be anything which won't be fired if it's not a SQL statement.
string | $dbAlias | Name of Database to be used. |
string | $sql | Select Query |
array | $result | content depends on $sql. $sql='insert ...': mysql_last_insert_id will be returned in $result. $sql='update ...' or 'delete ----': mysql_affected_rows will be returned in $result. $sql='select ...': all selected rows will be returned in $result. $result will be formatted like specified in $merge. Attention: with EXPECT_1|EXPECT_0_1 '$result' is a one dimensional array, else a two dimensional array. |
array | $keys | |
string | $expect | |
string | $merge | Applies different modes of merging - MERGE_NONE, MERGE_ROW, MERGE_ALL |
integer | $arrayMode |
true: all ok false: a) Number of rows don't match $expect b) $expect==EXPECT_SQL_OR_STRING and $sql is not an SQL expression (instead it's a regular string) - this is not bad, just to indicate that there was no query.