Beispiel #1
0
 /**
  * @group arnia-wrong-parameters
  */
 public function testCubridResult3()
 {
     if (OUTPUT_FUNCTION_NAME == true) {
         echo "\r\nRunning: " . __FUNCTION__ . " = ";
     }
     try {
         echo "connection:";
         echo $this->con;
         echo ".......";
         $this->assertTrue($this->createTestTable(), "Failed to create the test table.");
         echo ".......";
         $this->sql = "SELECT * FROM test_table";
         $this->req = cubrid_execute($this->con, $this->sql);
         echo $this->req;
         $value = cubrid_result(-1, -1);
         $this->assertTrue(FALSE, "Expected Exception not thrown.");
     } catch (Exception $e) {
         //echo $e->getMessage()."\r\n";
         $this->assertEquals(0, cubrid_error_code());
         $this->assertEquals(0, cubrid_error_code_facility());
         $this->assertEquals('', cubrid_error_msg());
     }
     $this->deleteTestTable();
 }
function cubrid_mysql_result($result, $row, $field = 1)
{
    return cubrid_result($result, $row, $field);
}
Beispiel #3
0
function sql_result($result, $row, $field = 0)
{
    if (isset($field) && !is_numeric($field)) {
        $field = strtolower($field);
    }
    $value = cubrid_result($result, $row, $field);
    if ($value === false) {
        output_error("SQL Error: " . sql_error(), E_USER_ERROR);
        return false;
    }
    return $value;
}