From: Thomas Mudrunka Date: Wed, 11 Apr 2012 11:56:35 +0000 (+0200) Subject: kosmeticky vylepseni migracnich skriptu X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=f7740b1c92b980d3529043d2e49798f5e0cc919f;p=mirrors%2FSokoMan.git kosmeticky vylepseni migracnich skriptu --- diff --git a/assistants/migrations.inc.php b/assistants/migrations.inc.php index acfe3bf..c492ecb 100644 --- a/assistants/migrations.inc.php +++ b/assistants/migrations.inc.php @@ -1,8 +1,9 @@
-

populate columns item_date_bought and item_date_sold

-- populate columns item_date_bought and item_date_solddb->safe_query_fetch('SELECT item_id,MIN(item_valid_from) AS min,MAX(item_valid_from) AS max FROM item GROUP BY item_id;'); //print_r($data); echo("START TRANSACTION;\n"); foreach($data as $line) echo("UPDATE item SET item_date_bought='".$line['min']."',item_date_sold='".$line['max']."' WHERE item_id=".$line['item_id'].";\n"); echo("COMMIT;\n"); ?> +