$users=$db->rawQuery("SELECT id, firstName, lastName FROM users WHERE id = ? AND login = ?",$params);
$users=$db->rawQuery("SELECT id, firstName, lastName FROM users WHERE id = ? AND login = ?",$params);
...
@@ -148,8 +148,17 @@ print_r($users); // contains Array of returned rows
...
@@ -148,8 +148,17 @@ print_r($users); // contains Array of returned rows
// will handle any SQL query
// will handle any SQL query
$params=Array(10,1,10,11,2,10);
$params=Array(10,1,10,11,2,10);
$resutls=$db->rawQuery("(SELECT a FROM t1 WHERE a = ? AND B = ? ORDER BY a LIMIT ?) UNION(SELECT a FROM t2 WHERE a = ? AND B = ? ORDER BY a LIMIT ?)",$params);
$q="(
print_r($results);// contains Array of returned rows
SELECT a FROM t1
WHERE a = ? AND B = ?
ORDER BY a LIMIT ?
) UNION (
SELECT a FROM t2
WHERE a = ? AND B = ?
ORDER BY a LIMIT ?
)";
$resutls=$db->rawQuery($q,$params);
print_r($results);// contains Array of returned rows