+/* use Mysql in the background */
+function DB_query($query)
+{
+ return mysql_query($query);
+}
+
+function DB_fetch_array($result)
+{
+ return mysql_fetch_array($result,MYSQL_NUM);
+}
+
+function DB_insert_id()
+{
+ return mysql_insert_id();
+}
+
+function DB_num_rows($result)
+{
+ return mysql_num_rows($result);
+}
+/* end Mysql functions */
+
+function DB_query_array($query)
+{
+ $result = DB_query($query);
+ $return = DB_fetch_array($result);
+
+ return $return;
+}
+
+function DB_query_array_all($query)
+{
+ $result = array();
+
+ $queryresult = DB_query($query);
+ while($row = DB_fetch_array($queryresult))
+ $result[] = $row;
+
+ return $result;
+}
+