I'm trying to add a cron that automatically creates a new show every 5 hours. After spending forever debugging, the cron no longer throws any errors when ran. However, it doesn't actually do anything.
$loop = $this->DB->query(
"SELECT
`event_types`.`id`,
`event_types`.`species`
FROM
`event_types`"
);
while ($event = $this->DB->fetch($loop)) {
$eventID = $event['id'];
$species = $event['species'];
$this->DB->query(
"INSERT INTO
`shows`
(
`player_id`,
`event_id`,
`event_type`,
`entry_fee`,
`created`,
`prize`,
`species`
)
VALUES
(
101,
1,
'$eventID',
0,
CURRENT_TIMESTAMP,
100,
'$species'
)"
);
}
It's just a short and simple insert query, but the cron won't add any rows when ran.
$loop = $this->DB->query(
"SELECT
`event_types`.`id`,
`event_types`.`species`
FROM
`event_types`"
);
while ($event = $this->DB->fetch($loop)) {
$eventID = $event['id'];
$species = $event['species'];
$this->DB->query(
"INSERT INTO
`shows`
(
`player_id`,
`event_id`,
`event_type`,
`entry_fee`,
`created`,
`prize`,
`species`
)
VALUES
(
101,
1,
'$eventID',
0,
CURRENT_TIMESTAMP,
100,
'$species'
)"
);
}
It's just a short and simple insert query, but the cron won't add any rows when ran.
Last edited by a moderator: