Mysql Powerdns issue when adding a new CName record
- by Roland
I'm trying to add a new CNAME record in PowerDNS to the mysql database, but my website does not want to show. When adding it in via Zone Admin it works, but as soon as I add the record as below it just does not want to work. Am I doing something wrong here. I checked if my record looks exactly the same in the DB as the record added with PowerDNS and it does.
$type = 'CNAME';
//Adding the subdomain to the DNS database
$sql = "insert into records "
. "(domain_id, name,type,content,ttl,prio,change_date) values(";
$sql .= $domain_id . ",'";
$sql .= trim($subdomain).".". trim($domain) . "','";
$sql .= trim($type) . "','";
$sql .= trim($domain) . "',";
$sql .= "3600,0,'".time()."')";