queryRaw() will now be officially supported, returns mysqli_result instead of array of assoc

arrays
This commit is contained in:
Sergey Tsalkov
2011-09-23 15:57:36 -07:00
parent f09308a3f7
commit 164c7157a6
2 changed files with 7 additions and 0 deletions

View File

@@ -97,6 +97,12 @@ class BasicTest extends SimpleTest {
$this->assert($username === 'Bart');
$this->assert($password === 'hello');
$this->assert($age == 15);
$mysqli_result = DB::queryRaw("SELECT * FROM accounts WHERE favorite_word IS NULL");
$this->assert($mysqli_result instanceof MySQLi_Result);
$row = $mysqli_result->fetch_assoc();
$this->assert($row['password'] === 'goodbye');
$this->assert($mysqli_result->fetch_assoc() === null);
}
function test_4_query() {