389 |
389 |
390 foreach ($mashes->MASH as $mash) { |
390 foreach ($mashes->MASH as $mash) { |
391 $sql = "INSERT INTO inventory_mash_profiles SET name='" . mysqli_real_escape_string($db, $mash->NAME); |
391 $sql = "INSERT INTO inventory_mash_profiles SET name='" . mysqli_real_escape_string($db, $mash->NAME); |
392 if ($mash->NOTES) |
392 if ($mash->NOTES) |
393 $sql .= "', notes='" . mysqli_real_escape_string($db, $mash->NOTES); |
393 $sql .= "', notes='" . mysqli_real_escape_string($db, $mash->NOTES); |
394 if ($mash->GRAIN_TEMP) |
|
395 $sql .= "', grain_temp='" . $mash->GRAIN_TEMP; |
|
396 if ($mash->TUN_TEMP) |
|
397 $sql .= "', tun_temp='" . $mash->TUN_TEMP; |
|
398 if ($mash->SPARGE_TEMP) |
|
399 $sql .= "', sparge_temp='" . $mash->SPARGE_TEMP; |
|
400 if ($mash->PH) |
|
401 $sql .= "', ph='" . $mash->PH; |
|
402 if ($mash->TUN_WEIGHT) |
|
403 $sql .= "', tun_weight='" . $mash->TUN_WEIGHT; |
|
404 if ($mash->TUN_SPECIFIX_HEAT) |
|
405 $sql .= "', tun_specific_heat='" . $mash->TUN_SPECIFIC_HEAT; |
|
406 ($mash->EQUIP_ADJUST == 'TRUE') ? $sql .= "', equip_adjust='1" : $sql .= "', equip_adjust='0"; |
|
407 |
394 |
408 /* |
395 /* |
409 * Put the steps in a json array |
396 * Put the steps in a json array |
410 */ |
397 */ |
411 if ($mash->MASH_STEPS) { |
398 if ($mash->MASH_STEPS) { |