本文整理汇总了PHP中Update::runQuery方法的典型用法代码示例。如果您正苦于以下问题:PHP Update::runQuery方法的具体用法?PHP Update::runQuery怎么用?PHP Update::runQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Update
的用法示例。
在下文中一共展示了Update::runQuery方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: USER
require_once 'classes/class.user.php';
$user_home = new USER();
if (!$user_home->is_logged_in()) {
$user_home->redirect('index.php');
}
$stmt = $user_home->runQuery("SELECT * FROM users WHERE id=:uid");
$stmt->execute(array(":uid" => $_SESSION['userSession']));
$row = $stmt->fetch(PDO::FETCH_ASSOC);
require_once 'classes/class.update.php';
$update = new Update();
$scode = trim($_POST['supcode']);
$units = trim($_POST['units']);
$appkgs = trim($_POST['appkgs']);
$supkgs = trim($_POST['supkgs']);
$editor = $row['id'];
$stmt = $update->runQuery("SELECT * FROM today_supply WHERE supplier_code=:sup_code");
$stmt->execute(array(":sup_code" => $scode));
$row = $stmt->fetch(PDO::FETCH_ASSOC);
if ($stmt->rowCount() > 0) {
$msg = '<div class="alert alert-warning alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4> <i class="icon fa fa-warning"></i> Sorry!</h4>
Supply record Already added.
</div>';
// $msg = "
// <div class='alert alert-error'>
// <button class='close' data-dismiss='alert'>×</button>
// <strong>Sorry !</strong> email allready exists , Please Try another one
// </div>
// ";
} else {