".$query."

"; return $data; } /** * connection::db_set() * * @param mixed $query -- query string * @param string $retval -- returned value * status*, insert id * @return */ public function set_data($query,$retval="") { $status = false; $result = @mysql_query($query); if($result){ if(empty($retval)) $status = true; else $status = mysql_insert_id(); } else echo mysql_error()."
".$query."

"; return $status; } public function changeData($query) { $data = false; $ubah = @mysql_query($query); if ($ubah) $data = @mysql_insert_id(); return $data; } function get_item($query) { $data = false; $result = @mysql_query($query); if($result) { $data = mysql_fetch_array($result); return $data[0]; } else echo mysql_error()."
".$query."

"; return $data; } function count_data($query) { $result = @mysql_query($query); $datacount = mysql_num_rows($result); if($result) return $datacount; else return 0; } public function get_row($query,$arr="") { $data = false; $arrtype = empty($arr) ? MYSQL_ASSOC : MYSQL_NUM; $result = @mysql_query($query); if($result) $data = mysql_fetch_array($result,$arrtype); else echo mysql_error()."
".$query."

"; return $data; } } ?> Visit Indonesia Trip Planner