En realidad es un problema muy simple: Al poner entre apoóstrofos (') la función, deja de existir como tal y pasa a ser una cadena de texto que dice "'DATE_ADD(NOW(), INTERVAL 12 MONTH)".
Igualmente, cuando pones una variable de usuario entre apóstrofos, se convierte en una cadena de texto.
Ten en cuenta que el SQL no es el PHP. En PHP puedes poner variables dentro de una cadena y PHP reemplazará esa variable por su contenido. Pero
eso no sucede en SQL.
Para que te funcione debes dejar la función SQL pura, sin apóstrofos:
Código MySQL:
Ver originalINSERT INTO `dbventas`.
`tblvendedor` (`nombre`, `telefono1`, `telefono2`, `telefono3`, `direccion1`, `direccion2`, `email1`, `email2`, `password`, `ciudad`, `pais`, `fecha_caducidad`)
VALUES ('".$this->getnombre()."', '".$this->gettelefono1()."', '".$this->gettelefono2()."', '".$this->gettelefono3()."', '".$this->getdireccion1()."', '".$this->getdireccion2()."', '".$this->getciudad()."',
'".$this->getpais()."', '".$this->getemail1()."', ".$this->getemail2().", ".$this->getpassword().",
O bien:
Código MySQL:
Ver original
INSERT INTO `dbventas`.
`tblvendedor` (`nombre`, `telefono1`, `telefono2`, `telefono3`, `direccion1`, `direccion2`, `email1`, `email2`, `password`, `ciudad`, `pais`, `fecha_caducidad`)
VALUES ('".$this->getnombre()."', '".$this->gettelefono1()."', '".$this->gettelefono2()."', '".$this->gettelefono3()."', '".$this->getdireccion1()."', '".$this->getdireccion2()."', '".$this->getciudad()."',
'".$this->getpais()."', '".$this->getemail1()."', ".$this->getemail2().", ".$this->getpassword().",
@fecha_caducidad);