Hi,
I am trying to access the MySQL function TO_DAYS() from PHP.
>From MySQL I can type in: SELECT TO_DAYS('2000-1-1') AS bar;
and I get:
++
| bar|
++
| 730485 |
++
1 row in set (0.00 sec)
>From PHP, I have tried:
$sql="SELECT TO_DAYS(2001-01-01) AS bar";
$res
On Thu, 31 Jan 2002, DL Neil wrote:
> Garry,
> I regret to say that I can't see an immediate answer.
>
> > CREATE TABLE breeding (
> > rec SMALLINT(4) UNSIGNED AUTO_INCREMENT,
> > sire SMALLINT(4) UNSIGNED,
> > dam SMALLINT(4) UNSIGNED,
> > paired DATE,
> > split DATE,
> > num_offspr
On Wed, 30 Jan 2002, DL Neil wrote:
>
> Can I request some db-speak please? You already have a tbl (or more).
> So let's start by asking for the table definitions
The table definition is as follows:
CREATE TABLE breeding (
rec SMALLINT(4) UNSIGNED AUTO_INCREMENT,
sire SMALLINT(4) UNSIGNED,
Hi All,
I have a problem working out a suitable algorithm either in PHP or MySQL.
Basically I have a DB that keeps track of breeding records. Each record
has a paired data, and a split-up date.
I need to generate some statistics to work out average numbers of pairs
per month, averaged on a