fix named parameters

This commit is contained in:
Sergey Tsalkov
2012-07-22 17:43:34 -07:00
parent 7582961ee1
commit 5b4e5a959a
2 changed files with 4 additions and 7 deletions

View File

@@ -150,7 +150,7 @@ class BasicTest extends SimpleTest {
$this->assert($row['password'] === 'blahblahblahblah');
$this->assert($row['favorite_word'] === null);
$row = DB::query("SELECT * FROM accounts WHERE password=%s_mypass AND username=%s_myuser",
$row = DB::query("SELECT * FROM accounts WHERE password=%s_mypass AND (password=%s_mypass) AND username=%s_myuser",
array('myuser' => 'newguy', 'mypass' => 'blahblahblahblah')
);
$this->assert(count($row) === 1);