mirror of
https://github.com/dg/dibi.git
synced 2025-08-29 08:49:50 +02:00
* new: qualifiy each column name with the table name using DibiResult::setWithTables
* removed DibiResult::setType(TRUE) with autodetection * removed DibiResult::getFields() & getMetaData() in favour of new method getColumnsMeta() * MySQLi and MySQL transaction implementation are the same * better escaping in DibiPostgreDriver (new pg_escape_string and addslashes)
This commit is contained in:
@@ -41,7 +41,8 @@ dibi::test("
|
||||
UPDATE [colors] SET", array(
|
||||
'color' => 'blue',
|
||||
'order' => 12,
|
||||
), "WHERE [id]=%i", 123);
|
||||
), "
|
||||
WHERE [id]=%i", 123);
|
||||
|
||||
|
||||
// SELECT
|
||||
@@ -51,10 +52,15 @@ $timestamp = mktime(0, 0, 0, 10, 13, 1997);
|
||||
dibi::test('
|
||||
SELECT COUNT(*) as [count]
|
||||
FROM [comments]
|
||||
WHERE [ip] LIKE %s', $ipMask, 'AND [date] > ', dibi::date($timestamp)
|
||||
WHERE [ip] LIKE %s', $ipMask, '
|
||||
AND [date] > ', dibi::date($timestamp)
|
||||
);
|
||||
|
||||
|
||||
// IN array
|
||||
$array = array(1, 2, 3);
|
||||
dibi::test("SELECT * FROM [people] WHERE [id] IN (", $array, ")");
|
||||
dibi::test("
|
||||
SELECT *
|
||||
FROM [people]
|
||||
WHERE [id] IN (", $array, ")
|
||||
");
|
||||
|
Reference in New Issue
Block a user