prepare("SELECT * FROM meta WHERE comic_id = ? AND name = ?"); $getmeta->bind_param("is", $id, $name); $getmeta->execute(); $getmeta2 = $getmeta->get_result(); $getmeta3 = $getmeta2->fetch_assoc(); if ($getmeta3['name'] == $name) { return true; } return false; } function get_meta($id, $name) { global $mysql_conn; $getmeta = $mysql_conn->prepare("SELECT * FROM meta WHERE comic_id = ? AND name = ?"); $getmeta->bind_param("is", $id, $name); $getmeta->execute(); $getmeta2 = $getmeta->get_result(); $getmeta3 = $getmeta2->fetch_assoc(); return $getmeta3['value']; } function next_comic_id() { global $mysql_conn; $getcomic = $mysql_conn->query("SELECT * FROM comics WHERE status = \"publish\" ORDER BY comic_id DESC LIMIT 0,1"); $getcomic3 = $getcomic->fetch_assoc(); return ($getcomic3['comic_id']+1); } ?>