/** * runs a query and returns the result * * @param string $query query to execute * @param PMA_DrizzleCon $link connection object * @param int $options query options * * @return PMA_DrizzleResult */ public function realQuery($query, $link, $options) { $buffer_mode = $options & PMA_DatabaseInterface::QUERY_UNBUFFERED ? PMA_Drizzle::BUFFER_ROW : PMA_Drizzle::BUFFER_RESULT; $res = $link->query($query, $buffer_mode); return $res; }
/** * runs a query and returns the result * * @param string $query query to execute * @param PMA_DrizzleCon $link connection object * @param int $options * @return PMA_DrizzleResult */ function PMA_DBI_real_query($query, $link, $options) { $buffer_mode = $options & PMA_DBI_QUERY_UNBUFFERED ? PMA_Drizzle::BUFFER_ROW : PMA_Drizzle::BUFFER_RESULT; $res = $link->query($query, $buffer_mode); return $res; }
/** * returns last error message or false if no errors occurred * * @param PMA_DrizzleCon $link connection object * * @return string|bool $error or false */ public function getError($link) { $GLOBALS['errno'] = 0; if (null !== $link && false !== $link) { $error_number = drizzle_con_errno($link->getConnectionObject()); $error_message = drizzle_con_error($link->getConnectionObject()); } else { $error_number = drizzle_errno(); $error_message = drizzle_error(); } if (0 == $error_number) { return false; } // keep the error number for further check after // the call to getError() $GLOBALS['errno'] = $error_number; return $GLOBALS['dbi']->formatError($error_number, $error_message); }