Jump to content

OA01

Members
  • Posts

    176
  • Joined

  • Last visited

Posts posted by OA01

  1. First delete some files such as your fleet files and host them else where and link them to your fleet page. Or you could upgrade your hosting package, to increase the space.
    Physical space isn't an issue, I have unlimited. I am just performing good housekeeping! The following works a treat.
    mysql_query("update pireps set rawdata='', log='', route='' where submitdate < DATE_SUB(NOW(), INTERVAL 3 MONTH)") or die(mysql_error());
    mysql_query("update adminlog set id='', pilotid='', datestamp='', message='' where datestamp < DATE_SUB(NOW(), INTERVAL 1 MONTH)") or die(mysql_error());
    mysql_query("DELETE FROM pirepcomments WHERE postdate < DATE_SUB(NOW(), INTERVAL 2 MONTH)") or die(mysql_error());
    

  2. I am trying to run a CRON job containing the following commands:

    mysql_query("update pireps set rawdata='', log='', route='' where submitdate < DATE_SUB(NOW(), INTERVAL 3 MONTH)") or die(mysql_error());
    mysql_query("update adminlog set id='', pilotid='', datestamp='', message='' where datestamp < DATE_SUB(NOW(), INTERVAL 1 MONTH)") or die(mysql_error());
    mysql_query("update pirepcomments set id='', pirepid='', pilotid='', comment='', postdate='' where postdate < DATE_SUB(NOW(), INTERVAL 3 MONTH)") or die(mysql_error());
    

    The first two lines appear to run OK. However the last line generates the following error:

    Cannot add or update a child row: a foreign key

    constraint fails (`orangea1_acars`.`pirepcomments`, CONSTRAINT

    `pirepcomments_ibfk_1` FOREIGN KEY (`pirepid`) REFERENCES `pireps` (`pirepid`) ON

    DELETE CASCADE ON UPDATE CASCADE)

    All suggestions welcomed :)

  3. The default fuel price is $5.10 p/lb, WAY to high!!! The real world price is $0.44 p/lb!!! Edit your \\core\local.config.php file and make it look like this (Mine is in Euro):

    /*   Fuel info - Price correct as of 13-06-14. Sum=price(p/g) / 6.7 then convert to Euro
     Default fuel price, for airports that don't have live pricing
    And the surcharge percentage. View the docs for more details about these
    */
    Config::Set('FUEL_GET_LIVE_PRICE', true);
    Config::Set('FUEL_DEFAULT_PRICE', '0.32');
    Config::Set('FUEL_SURCHARGE', '0.0');
    

  4. Not certain this is of use to you? In order to let my pilots fly to/from anywhere they like I created a route that omits the dep & arr icao. Pilots can then use the dropdown. Just import the attached file (edit to suite) into your schedules. Hope this helps someone :)

    Import - Free Flight.csv

×
×
  • Create New...