holas, estoy haciendo una clase por cada tabla que tenga la base de datos, las tablas estan relacionadas, ejemplo:
tabla paciente:
idpaciente
nombres
apellidos
edad
tabla agenda
idagenda
idpaciente
feha
hora
ese es mi clase que estoy haciendo para la agenda, en idpaciente de agenda, como puedo recuperar el id del paciente?
tabla paciente:
idpaciente
nombres
apellidos
edad
tabla agenda
idagenda
idpaciente
feha
hora
PHP:
<?php
include ('paciente.class.php');
class cAgenda extends cPaciente
{
var $idpaciente;
var $fecha;
var $hora;
var $detalle;
function cAgenda()
{
$this->idpaciente=;
$this->fecha=$_POST['fecha'];
$this->hora=$_POST['hora'];
$this->detalle=$_POST['detalle'];
}
}