inc/record.inc.php
changeset 120 982f722376b4
parent 119 f74e4f88b680
child 126 cb06e3e29ed8
--- a/inc/record.inc.php	Mon Mar 31 06:43:38 2008 +0000
+++ b/inc/record.inc.php	Mon Mar 31 21:10:19 2008 +0000
@@ -19,6 +19,13 @@
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+function get_zone_id_from_record_id($rid) {
+	global $db;
+	$query = "SELECT domain_id FROM records WHERE id = " . $db->quote($rid);
+	$zid = $db->queryOne($query);
+	return $zid;
+}
+
 function count_zone_records($zone_id) {
 	global $db;
 	$sqlq = "SELECT COUNT(id) FROM records WHERE domain_id = ".$db->quote($zone_id);