Tengo este codigo donde inserto un nuevo registro
$insertar = $db->prepare("INSERT INTO tb_vendedores VALUES (0,:cedula,:nombre,:direccion,:correo,:celular,:telefono,:ciudad,:estado)");
$insertar->bindParam(":cedula", $_POST['cedula'], PDO::PARAM_INT);
$insertar->bindParam(":nombre", strtoupper($_POST['nombre']), PDO::PARAM_STR);
$insertar->bindParam(":direccion", strtoupper($_POST['direccion']), PDO::PARAM_STR);
$insertar->bindParam(":correo", $_POST['correo'], PDO::PARAM_STR);
$insertar->bindParam(":celular", $_POST['celular'], PDO::PARAM_INT);
$insertar->bindParam(":telefono", $_POST['telefono'], PDO::PARAM_INT);
$insertar->bindParam(":ciudad", strtoupper($_POST['ciudad']), PDO::PARAM_STR);
$insertar->bindParam(":estado", $_POST['estado'], PDO::PARAM_STR);
$insertar->execute();
if($insertar->rowCount() > 0){
echo "Bien";
}else{
echo "error";
}
Asi funciona correctamente solo que mi duda es si es la mejor forma de hacerlo. Gracias