niewbie - call methods from another class
| From: | MEM | Date: | Sun, 19 Apr 2009 14:43:45 +0000 |
| Subject: | niewbie - call methods from another class | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-291665@lists.php.net to get a copy of this message | ||
Hello, I have something like this:
$stmt = $this->_dbh->prepare("INSERT INTO DOG (name_dog, race_dog, id_vet)
VALUES (?, ?, ?)");
$stmt->bindParam(1, $this->getNameDog() );
$stmt->bindParam(2, $this->getRaceDog());
$stmt->bindParam(3, ????????????????????);
$stmt->execute();
}
To make this insert function work, I need to fill the id_vet database column
with some values.
I cannot use $this->getIdVet() because this method is not in dog class, is
on the veterinary class.
So my question is:
How can I access the getIdVet() that is on the veterinary class to put it on
the insert dog method?
Thanks a lot,
Márcio