public function setHashValue($hash_value) { if ($hash_value == null || trim($hash_value) == "") { return; } $query_string = "UPDATE patient SET hash_value='{$hash_value}' " . "WHERE patient_id={$this->patientId}"; query_update($query_string); }
if ($_REQUEST['type'] == 'color') { $image = $_REQUEST['image']; $data['color_image'] = ''; query_update('tbl_color', $data, "color_id='" . $_REQUEST['id'] . "'"); @unlink('../uploads/color/' . $image); } if ($_REQUEST['type'] == 'style') { $image = $_REQUEST['image']; $data['style_image'] = ''; query_update('tbl_style', $data, "style_id='" . $_REQUEST['id'] . "'"); @unlink('../uploads/style/' . $image); } if ($_REQUEST['type'] == 'manufactures') { $image = $_REQUEST['image']; $data['manufacturers_image'] = ''; query_update('tbl_manufacturers', $data, "manufacturers_id='" . $_REQUEST['id'] . "'"); @unlink('../uploads/manufactures/' . $image); } if ($_REQUEST['type'] == 'category_admindropdown') { ?> <?php $catId = $_GET['catId']; ?> <?php $subcategory = query("SELECT category_id, category_name FROM tbl_category WHERE category_level='2' AND category_status='active' AND category_parent_id='{$catId}' ORDER BY category_name ASC"); ?> <?php if (query_rows($subcategory) > 0) { ?> <select name="subcategory" id="subcategory" > <option value=""> Choose one </option>
public function updateStock($lid, $r_id, $lot, $n_lot, $e_date, $manu, $sup, $cost, $r_date, $remarks) { $lab_config_id = $lid; if ($cost == '') { $cost = 0; } $saved_db = DbUtil::switchToLabConfig($lab_config_id); $query_string = "UPDATE inv_supply SET lot='{$n_lot}', expiry_date='{$e_date}', manufacturer='{$manu}', supplier='{$sup}', cost_per_unit='{$cost}', date_of_reception='{$r_date}', remarks='{$remarks}' WHERE reagent_id = {$r_id} AND lot='{$lot}'"; query_update($query_string); $query_string = "UPDATE inv_usage SET lot='{$n_lot}' WHERE reagent_id = {$r_id} AND lot='{$lot}'"; query_update($query_string); DbUtil::switchRestore($saved_db); }
<?php include "../includes/db_mysql_lib.php"; $id = $_REQUEST['id']; $orgNameId = "originalDoctorName" . $id; $originalDoctorName = $_REQUEST[$orgNameId]; $newNameId = "newDoctorNameInput" . $id; $newDoctorName = $_REQUEST[$newNameId]; $query = "UPDATE specimen SET doctor = '{$newDoctorName}' " . "WHERE doctor like '{$originalDoctorName}' "; query_update($query); header("Location: ../");
$data['video_path'] = $image1; } else { $image1 = ''; $data['video_youtube'] = ''; //$data['video_path']=''; } if (file_exists($_FILES['filepath']['tmp_name'])) { move_uploaded_file($_FILES['filepath']['tmp_name'], "../uploads/videos/" . $image1); } } else { $data['video_path'] = ''; $data['video_youtube'] = $_POST['youtubeurl']; } /*if(isset($_POST['featured'])){ $data['video_featured']='Yes'; }else{ $data['video_featured']='No'; }*/ if ($_POST['video_id'] != '') { query_update('tbl_video', $data, "video_id='" . $_POST['video_id'] . "'"); //exit; echo "<script language='javascript'> window.location='video.php'; </script>"; exit; } else { $data['video_date'] = date('Y-m-d H:i:s'); $data['video_status'] = 'active'; $id = query_insert('tbl_video', $data); echo "<script language='javascript'> window.location='video.php'; </script>"; exit; } }