www/import/from_brouwhulp.php

changeset 213
b0d484a5525e
parent 209
dc30801e6961
child 217
318aab371497
equal deleted inserted replaced
212:adda48f710cd 213:b0d484a5525e
571 571
572 if ($comma) 572 if ($comma)
573 $steps .= ','; 573 $steps .= ',';
574 $comma = TRUE; 574 $comma = TRUE;
575 $steps .= '{"step_name":"' . mysqli_real_escape_string($db, $step->NAME) . '"'; 575 $steps .= '{"step_name":"' . mysqli_real_escape_string($db, $step->NAME) . '"';
576 if ($step->TYPE) { 576 if ($step->TYPE == 'Infusion')
577 $steps .= ',"step_type":"' . $step->TYPE . '"'; 577 $steps .= ',"step_type":"0"';
578 } 578 else if ($step->TYPE == 'Temperature')
579 $steps .= ',"step_type":"1"';
580 else if ($step->TYPE == 'Decoction')
581 $steps .= ',"step_type":"2"';
582 else
583 echo "Unknown step TYPE " . $step->TYPE . PHP_EOL;
579 if ($step->STEP_TEMP) { 584 if ($step->STEP_TEMP) {
580 $steps .= ',"step_temp":"' . floatval($step->STEP_TEMP) . '"'; 585 $steps .= ',"step_temp":"' . floatval($step->STEP_TEMP) . '"';
581 } 586 }
582 if ($step->STEP_TIME) { 587 if ($step->STEP_TIME) {
583 $steps .= ',"step_time":"' . floatval($step->STEP_TIME) . '"'; 588 $steps .= ',"step_time":"' . floatval($step->STEP_TIME) . '"';

mercurial