+ /**
+ * @brief Returns the selected database name
+ *
+ * @return string
+ */
+ public function database_name() {
+ $r = $this->q("SELECT DATABASE() AS `db`");
+
+ return $r[0]['db'];
+ }
+
+ /**
+ * @brief Returns the number of rows
+ *
+ * @return integer
+ */
+ public function num_rows() {
+ if (!$this->result) {
+ return 0;
+ }
+
+ if ($this->mysqli) {
+ $return = $this->result->num_rows;
+ } else {
+ $return = mysql_num_rows($this->result);
+ }
+ return $return;
+ }
+