Collecting nette\database query, how to resolve %t, %b parameters etc.?

mcmatak
Member | 492
+
0
-

I need to collect query in string, i am not abble to use

$database->query("SELECT * FROM products WHERE hidden = ?", $hidden, " AND dateInserted > %d", $dateInserted);

i have to use

$database->query($query);

so, i collect query as a string, but how to resolve parameters according to used connection type?

in mssql is different use of boolean and date and time then in mysql

?

Felix
Nette Core | 902
+
0
-

How do you call it? Why can't you use multiple arguments? Or func_get_args && call_user_func_array?

Comments

mcmatak:

it is used in connection with something like grid so you use it as

->applySorting($query)
->applyJoins($query)
->applyConditions($query)

etc.

4 years ago