• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP updateTable函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中updateTable函数的典型用法代码示例。如果您正苦于以下问题:PHP updateTable函数的具体用法?PHP updateTable怎么用?PHP updateTable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了updateTable函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: markReferralAsExchanged

 public static function markReferralAsExchanged($userId)
 {
     if ($userId == null) {
         return false;
     }
     $creditIds = self::checkAvailableReferral($userId);
     if ($creditIds == false) {
         return false;
     }
     $result = updateTable(self::REFERRALS_TABLE, 'exchange_date = \'' . date('Y-m-d H:i:s') . '\', exchanged = true', 'id IN(' . implode(',', $creditIds) . ')');
     return $result;
 }
开发者ID:narbelys,项目名称:fototea,代码行数:12,代码来源:Referral.php


示例2: validaSession

<?php

include "connect/database.php";
validaSession();
securityValidation($_COOKIE['id'], "20");
if ($_POST) {
    $we = "value = '" . $_POST['price'] . "'";
    updateTable("varios", $we, "id = 1");
}
$varios = listAll("varios", "WHERE id = 1");
$rs_var = mysql_fetch_object($varios);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Envio | Vaodesign</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<!--[if IE 9]>
    <link rel="stylesheet" media="screen" href="css/ie9.css"/>
<![endif]-->

<!--[if IE 8]>
    <link rel="stylesheet" media="screen" href="css/ie8.css"/>
<![endif]-->

<!--[if IE 7]>
    <link rel="stylesheet" media="screen" href="css/ie7.css"/>
<![endif]-->
<script type="text/javascript" src="js/plugins/jquery-1.7.min.js"></script>
开发者ID:narbelys,项目名称:fototea,代码行数:31,代码来源:envio.php


示例3: updateTable

<?php

include "functions.php";
if (isset($_POST['submit3']) && isset($_POST['answer3'])) {
    $answer3 = $_POST['answer3'];
    updateTable('3', 'answer3');
    if ($answer3 === "Yes") {
        header('Location: doubleConsult.php');
    } elseif ($answer3 === "No") {
        header('Location: question4.php');
    } else {
        echo "error";
    }
}
?>

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
    <link rel="stylesheet" href="style.css">
</head>
<body>

<form action="question3.php" name="Questionnaire" method="post" class="col-md-6 col-md-offset-4">
    <h1>PACT</h1>
    <p id="q1">Is it the first appointment of the patient?</p>
    <input class="answers" value="No" name="answer1">
    <p id="q2">How many complaints does the patient have?</p>
开发者ID:EsthervdG,项目名称:PACT,代码行数:31,代码来源:question3.php


示例4: mysql_query

             // a realizar nuestro proceso ya sea de login o registro.
             $user = $fbme['email'];
             $query_login = mysql_query("SELECT * FROM user WHERE user = '" . $user . "'");
             $num_login = mysql_num_rows($query_login);
             if ($num_login < 1) {
                 $login_resp = 'window.location="registroFacebook";';
             } else {
                 $rs_user = mysql_fetch_object($query_login);
                 $name = $rs_user->name . " " . $rs_user->lastname;
                 $login_date = explode("-", $rs_user->last_login);
                 if ($login_date[0] == "0000") {
                     $login_resp = 'window.location="completarPerfil";';
                     setcookie("user", $name, 0);
                     setcookie("id", $rs_user->id, 0);
                 } else {
                     updateTable("user", "last_login=NOW()", "id={$rs_user->id}");
                     $login_resp = 'window.location="perfil";';
                     setcookie("user", $name, 0);
                     setcookie("id", $rs_user->id, 0);
                 }
             }
             echo "<script>" . $login_resp . "</script>";
         }
     }
 }
 if ($_POST) {
     $user_user = $_REQUEST['user_user'];
     $user_pass = $_REQUEST['user_password'];
     $login = login($user_user, $user_pass);
     if ($login == false) {
         $app->addError("La combinación de Correo y Contrase&ntilde;a son incorrectos.");
开发者ID:narbelys,项目名称:fototea,代码行数:31,代码来源:index.php


示例5: updateTable

                $fileNameUnique = $fileName . "_" . $photo_id . "." . $extension;
                updateTable("albumes_det", "ad_url = '" . $fileNameUnique . "'", "ad_id = " . $photo_id);
                $pathFile = '../profiles/' . $perfilSha1 . '/' . $albumSha1 . '/' . $fileNameUnique;
                move_uploaded_file($file['tmp_name'], $pathFile);
                // Event: Fotos subidas álbumes
                $events = FAnalytics::getInstance();
                $events->trackEvent('Album - Fotos subidas', 'Foto subida al album ' . $albumId, $user->id);
                return 'success';
            } else {
                return 'error';
            }
        }
        if ($act == "principalFoto") {
            $foto = $_REQUEST['ad_id'];
            updateTable("albumes_det", "ad_is_principal = false", "ad_a_id = '{$_REQUEST['album']}'");
            updateTable("albumes_det", "ad_is_principal = true", "ad_a_id = '{$_REQUEST['album']}' AND ad_id = '{$foto}'");
        }
    }
    if ($act == "buscarFoto") {
        $foto = $_REQUEST['foto'];
        $limit = $foto - 1;
        $foto = listAll("albumes_det", "WHERE ad_a_id = '{$_REQUEST['a_id']}' AND ad_status='S' LIMIT {$limit},{$foto}");
        $rs_foto = mysql_fetch_object($foto);
        $url_img = "profiles/" . sha1($rs_foto->ad_user_id) . "/" . sha1($rs_foto->ad_a_id) . "/" . $rs_foto->ad_url;
        $fecha = explode(" ", dateField($rs_foto->ad_cdate));
        $desc = $fecha[0];
        $arreglo[] = array('img' => $url_img, 'desc' => $desc);
        echo json_encode($arreglo);
    }
} else {
    $app->redirect($app->getConfig()->getUrl('perfil'));
开发者ID:narbelys,项目名称:fototea,代码行数:31,代码来源:albumAction.php


示例6: isset

<?php

require "../include/init/init.php";
$id = isset($_GET["id"]) ? (int) $_GET["id"] : 1;
// 查询数据
$dataselect = editTable("SELECT * FROM jl_document WHERE document_id={$id}");
if ($_POST) {
    $name = trim($_POST["name"]) ? $_POST["name"] : "";
    $content = trim($_POST["content"]) ? $_POST["content"] : "";
    updateTable("UPDATE jl_document SET \n      document_name='{$name}',\n      document_content='{$content}' WHERE document_id={$id}", "./document.php");
}
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="">
  <meta name="author" content="">
  <link rel="icon" href="">
  <title>金陵后台管理</title>
  <link href="../css/bootstrap.min.css" rel="stylesheet">
  <link href="../css/dashboard.css" rel="stylesheet">
</head>
<body>
  <?php 
require "../include/admin_header.php";
?>
  <div class="col-sm-12 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <!-- 更改即可 -->
开发者ID:Jeffery-Cai,项目名称:jinlingV1-1,代码行数:31,代码来源:document_edit.php


示例7: isset

<?php

require "../include/init/init.php";
$id = isset($_GET["id"]) ? (int) $_GET["id"] : 1;
// 查询数据
$dataselect = editTable("SELECT * FROM jl_friend WHERE friend_id={$id}");
if ($_POST) {
    $name = trim($_POST["name"]) ? $_POST["name"] : "";
    $link = trim($_POST["link"]) ? $_POST["link"] : "";
    updateTable("UPDATE jl_friend SET \r\n      friend_name='{$name}',\r\n      friend_link='{$link}' WHERE friend_id={$id}", "./friend.php");
}
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="">
  <meta name="author" content="">
  <link rel="icon" href="">
  <title>金陵后台管理</title>
  <link href="../css/bootstrap.min.css" rel="stylesheet">
  <link href="../css/dashboard.css" rel="stylesheet">
</head>
<body>
  <?php 
require "../include/admin_header.php";
?>
  <div class="col-sm-12 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <!-- 更改即可 -->
开发者ID:Jeffery-Cai,项目名称:taiyi-smarty,代码行数:31,代码来源:friend_edit.php


示例8: select_row

<?php

require "../include/init/init.php";
$optiondata = select_row("SELECT * FROM jl_option");
// 修改数据
if ($_POST) {
    $keyword = $_POST["keyword"];
    $description = $_POST["description"];
    $address = $_POST["address"];
    $contact = $_POST["contact"];
    $copyright = $_POST["copyright"];
    updateTable("UPDATE `jl_option` SET `keyword`='{$keyword}',`description`='{$description}',`address`='{$address}',`contact`='{$contact}',`copyright`='{$copyright}'", "./option.php");
}
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="">
  <meta name="author" content="">
  <link rel="icon" href="">
  <title>金陵后台管理</title>
  <link href="../css/bootstrap.min.css" rel="stylesheet">
  <link href="../css/dashboard.css" rel="stylesheet">
</head>
<body>
  <?php 
require "../include/admin_header.php";
?>
开发者ID:Jeffery-Cai,项目名称:jinlingV1-1,代码行数:31,代码来源:option.php


示例9: header

         $_SESSION["lastpage"] = "index.php";
     } else {
         $_SESSION["message"] = "Delete failed";
         $_SESSION["message"] = "edit.php";
     }
     $_SESSION['loggedin'] = 'FALSE';
     $_SESSION['message'] = "Account Successfully Deleted!";
     header("Location: messages.php");
     break;
 case 'edit':
     header("Location: edit.php");
     break;
     //submits the users edit to the database and sets new session variables.
 //submits the users edit to the database and sets new session variables.
 case 'editted':
     $success = updateTable('customers', $_REQUEST, 'CustomerId');
     $success ? $_SESSION["message"] = "Update Successful!" : ($_SESSION["message"] = "Update Failed!");
     $success ? $_SESSION["lastpage"] = "index.php" : ($_SESSION["lastpage"] = "edit.php");
     $success ? $_SESSION["userfirstname"] = $_POST['CustFirstName'] : $_POST['CustFirstName'];
     $success ? $_SESSION["userlastname"] = $_POST['CustLastName'] : $_POST['CustLastName'];
     print "<br /><br /><br /><br />";
     print $success;
     header("Location: messages.php");
     break;
     //submits the users account to the database and sets session variables.
 //submits the users account to the database and sets session variables.
 case 'Register':
     $customer = new Customer("null", $_REQUEST["CustFirstName"], $_REQUEST["CustLastName"], $_REQUEST["CustAddress"], $_REQUEST["CustCity"], $_REQUEST["CustProv"], $_REQUEST["CustPostal"], $_REQUEST["CustCountry"], $_REQUEST["CustHomePhone"], $_REQUEST["CustBusPhone"], $_REQUEST["CustEmail"], 0, $_REQUEST["CustUsername"], $_REQUEST["CustPassword"]);
     if ($customer->customerAdd()) {
         #The user will be redirected to the index page if they've been added to the database.
         $_SESSION["loggedin"] = "TRUE";
开发者ID:Vekto,项目名称:OOSDProject1,代码行数:31,代码来源:reghandler.php


示例10: isset

 */
require "../include/inic.php";
// 接收url参数
$id = isset($_GET["id"]) ? (int) $_GET["id"] : 0;
$id_data = editTable("SELECT * FROM wd_case WHERE case_id={$id}");
if ($_POST) {
    $caseName = $_POST["caseName"];
    $caseLink = $_POST["caseLink"];
    $caseDescription = $_POST["caseDescription"];
    $caseTime = strtotime($_POST["caseTime"]);
    if ($_FILES) {
        upload_file("caseFileImg");
        $caseFileImg = $_FILES["caseFileImg"]["name"];
    }
    //插入sql语句
    updateTable("UPDATE `wd_case` SET \n\t\t`case_title`='{$caseName}',\n\t\t`case_link`='{$caseLink}',\n\t\t`case_add_time`='{$caseTime}',\n\t\t`case_img_url`='{$caseFileImg}',\n\t\t`case_description`='{$caseDescription}' WHERE case_id={$id}", "./products.php");
}
?>
<!doctype html>
<html lang="zh-ch">
	<!-- container-fluid -->
	<head>
		<title>文豆-后台管理</title>
		<meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="Content-Type" content="; charset=utf-8" />
		<link rel="stylesheet" href="bootstrap.min.css" />
		<link rel="stylesheet" href="../css/bootstrap-responsive.min.css" />
		<link rel="stylesheet" href="../css/unicorn.main.css" />
		<link rel="stylesheet" href="../css/uniform.css" />
		<link rel="stylesheet" href="../css/unicorn.grey.css" class="skin-color" />
开发者ID:Jeffery-Cai,项目名称:wengdoV1-2,代码行数:31,代码来源:products_add_edit.php


示例11: loginFb

function loginFb($user)
{
    $query_login = mysql_query("SELECT * FROM user WHERE user = '" . $user . "'");
    $num_login = mysql_num_rows($query_login);
    if ($num_login < 1) {
        $login_resp = 'window.location="../login";';
        return $login_resp;
    } else {
        $rs_user = mysql_fetch_object($query_login);
        $name = $rs_user->name . " " . $rs_user->lastname;
        setcookie("user", $name, 0);
        setcookie("id", $rs_user->id, 0);
        $login_date = explode("-", $rs_user->last_login);
        if ($login_date[0] == "0000") {
            $login_resp = 'window.location="../completarPerfil";';
            return $login_resp;
        } else {
            updateTable("user", "last_login=NOW()", "id={$rs_user->id}");
            $login_resp = 'window.location="../miHome";';
            return $login_resp;
        }
    }
}
开发者ID:narbelys,项目名称:fototea,代码行数:23,代码来源:libSM.php


示例12: updateTable

    $tel = $_REQUEST['phone'];
    $movil = $_REQUEST['mobile'];
    $city = $_REQUEST['city'];
    $id_user = $_GET['i'];
    $user_data = updateTable("user", "name = '{$name}',lastname= '{$lastname}',dob='{$dob}',act='{$user_act}',gender='{$gender}'", "id = '{$_GET['i']}'");
    updateTable("user_det", "description = '{$desc}'", "id_user = '{$id_user}' AND id_data = '2'");
    updateTable("user_det", "description = '{$direccion}'", "id_user = '{$id_user}' AND id_data = '3'");
    updateTable("user_det", "description = '{$cp}'", "id_user = '{$id_user}' AND id_data = '4'");
    updateTable("user_det", "description = '{$pais}'", "id_user = '{$id_user}' AND id_data = '5'");
    updateTable("user_det", "description = '{$tel}'", "id_user = '{$id_user}' AND id_data = '6'");
    updateTable("user_det", "description = '{$city}'", "id_user = '{$id_user}' AND id_data = '10'");
    $md = getUserData($id_user, "7");
    if (empty($md)) {
        insertTable("user_det", "'',{$id_user},'7','{$movil}'");
    } else {
        updateTable("user_det", "description = '{$movil}'", "id_user = '{$id_user}' AND id_data = '7'");
    }
    if ($user_data != false) {
        ?>
<script>
	alert("Se ha modificado el usuario correctamente.");
	window.location="usuarios.php";
	</script>
    <?php 
    } else {
        ?>
    <script>
	alert("No se ha  podido modificar el usuario correctamente.");
	window.history.back();
	</script>
    <?php 
开发者ID:narbelys,项目名称:fototea,代码行数:31,代码来源:usuarios-editar.php


示例13: foreach

    $mySqlStmt = "Delete From " . $inTableName;
    $mySqlStmt .= " Where ";
    foreach ($myKeys as $myKey) {
        $myDataValue = $inRowNode->xpath($myKey);
        $mySqlStmt .= $mySep . $myKey . " = '" . $myDataValue[0] . "'";
        $mySep = " AND ";
    }
    $result = mysql_query($mySqlStmt);
    if (mysql_error()) {
        printf("\n Errors detected on update %s ", mysql_error());
        return false;
    } else {
        printf("\n Delete successful %d ", $result);
        mysql_info();
        return true;
    }
}
/* ****************************************
Get input stream
**************************************** */
$xml = file_get_contents('php://input');
$xmlDoc = simplexml_load_string($xml);
/* ****************************************
Process input requests
**************************************** */
echo "\n------------------------------";
$myTables = $xmlDoc->xpath('//Table');
foreach ($myTables as $myTable) {
    updateTable($myTable);
}
include_once "WfwTerm.php";
开发者ID:WaterskiScoring,项目名称:LiveWebScoring,代码行数:31,代码来源:WfwImport.php


示例14: isset

/**
 * wengdo后台添加导航
 * author: Jeffery
 * create time: 2015-09-08
 */
require "../include/inic.php";
$id = isset($_GET["id"]) ? (int) $_GET["id"] : 0;
$id_data = editTable("SELECT * FROM wd_nav WHERE nav_id={$id}");
// 表单接收
if ($_POST) {
    $navName = $_POST["navName"];
    $navLink = $_POST["navLink"];
    $nav_pid = $_POST["nav_pid"];
    // 修改sql语句
    updateTable("UPDATE `wd_nav` SET \n\t\t`nav_name`='{$navName}',\n\t\t`nav_pid`='{$navLink}',\n\t\t`nav_links`='{$nav_pid}' WHERE nav_id={$id}", "./nav.php");
}
$navpiddata = selectDb("SELECT * FROM wd_nav WHERE nav_pid=0");
// var_dump($id_data);
?>
	

<!doctype html>
<html lang="zh-ch">
	<!-- container-fluid -->
	<head>
		<title>文豆-后台管理</title>
		<meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="Content-Type" content="; charset=utf-8" />
		<link rel="stylesheet" href="bootstrap.min.css" />
开发者ID:Jeffery-Cai,项目名称:wengdoV1-2,代码行数:30,代码来源:nav_add_edit.php


示例15: userAccoutUpdate

function userAccoutUpdate($user_code, $data)
{
    $condition["user_code"] = $user_code;
    // 更新用户基本信息表(追加数据)
    if (updateTable(TB_BAS_USER_ACCOUT, $data, $condition, 'add')) {
        return true;
    } else {
        return false;
    }
}
开发者ID:ReadYun,项目名称:vixik,代码行数:10,代码来源:userFunc.php


示例16: array

<html>
<body>

<?php 
$teamCollections = array($_POST['club'], $_POST['club1'], $_POST['club2'], $_POST['club3'], $_POST['club4'], $_POST['club5'], $_POST['club6'], $_POST['club7'], $_POST['club8'], $_POST['club9'], $_POST['club10'], $_POST['club11'], $_POST['club12'], $_POST['club13']);
$scoresCollection = array($_POST['goals1'], $_POST['goals2'], $_POST['goals3'], $_POST['goals4'], $_POST['goals5'], $_POST['goals6'], $_POST['goals7'], $_POST['goals8'], $_POST['goals9'], $_POST['goals10'], $_POST['goals11'], $_POST['goals12'], $_POST['goals13'], $_POST['goals14']);
updateTable($teamCollections, $scoresCollection);
function updateTable($teamCollections, $scoresCollection)
{
    if (!scoresAreOK($scoresCollection)) {
        echo '<span style="color:red;text-align:center;">Scorurile trebuie sa fie intre 0 - 9!</span>';
    } else {
        if (!teamsAreUnique($teamCollections)) {
            echo '<span style="color:red;text-align:center;">Intr-o etapa o echipa joaca un singur meci impotriva oricarei alte echipe!</span>';
        } else {
            for ($count = 0; $count < 14; $count = $count + 2) {
                if ($scoresCollection[$count] == $scoresCollection[$count + 1]) {
                    resolveDrawn($teamCollections[$count], $scoresCollection[$count], $teamCollections[$count + 1]);
                } else {
                    if ($scoresCollection[$count] > $scoresCollection[$count + 1]) {
                        resolveWin($teamCollections[$count], $scoresCollection[$count], $scoresCollection[$count + 1], $teamCollections[$count + 1]);
                    } else {
                        resolveWin($teamCollections[$count + 1], $scoresCollection[$count + 1], $scoresCollection[$count], $teamCollections[$count]);
                    }
                }
            }
        }
    }
}
function resolveDrawn($team1, $goals, $team2)
{
开发者ID:LucianIacob,项目名称:AN3-PW-PHP,代码行数:31,代码来源:update_table.php


示例17: isset

<?php

require "../include/init/init.php";
$id = isset($_GET["id"]) ? (int) $_GET["id"] : 1;
// 查询数据
$dataselect = editTable("SELECT * FROM jl_products WHERE products_id={$id}");
if ($_POST) {
    $name = trim($_POST["name"]) ? $_POST["name"] : "";
    $content = trim($_POST["products_content"]) ? $_POST["products_content"] : "";
    if ($_FILES) {
        upload_file("img");
        $img = $_FILES["img"]["name"];
    }
    updateTable("UPDATE jl_products SET \r\n     products_name='{$name}',\r\n      products_img='{$img}',\r\n      products_content='{$content}' WHERE products_id={$id}", "./products.php");
}
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="">
  <meta name="author" content="">
  <link rel="icon" href="">
  <title>金陵后台管理</title>
  <link href="../css/bootstrap.min.css" rel="stylesheet">
  <link href="../css/dashboard.css" rel="stylesheet">
</head>
<body>
  <?php 
开发者ID:Jeffery-Cai,项目名称:taiyi-smarty,代码行数:31,代码来源:products_edit.php


示例18: updateTable

            case 'Equipos':
                updateTable("UPDATE equipo SET Nombre = 'Team code' WHERE Id_Equipo = 1");
                updateTable("UPDATE equipo SET Nombre = 'and play' WHERE Id_Equipo = 2");
                updateTable("UPDATE equipo SET Puntos = 0 WHERE Id_Equipo = 1 OR Id_Equipo = 2");
                break;
            case 'Respuestas':
                updateTable("UPDATE respuestas SET Oculto = 0 WHERE Oculto = 1");
                break;
            case 'Preguntas':
                updateTable("UPDATE preguntas SET Usado = 0 WHERE Usado = 1");
                break;
            case 'Todo':
                updateTable("UPDATE equipo SET Puntos = 0 WHERE Id_Equipo = 1 OR Id_Equipo = 2");
                updateTable("UPDATE respuestas SET Oculto = 0 WHERE Oculto = 1");
                updateTable("UPDATE preguntas SET Usado = 0 WHERE Usado = 1");
                updateTable("UPDATE equipo SET Nombre = 'Team' WHERE Id_Equipo = 1 OR Id_Equipo = 2");
                break;
            default:
                # code...
                break;
        }
    }
}
//GETS
if (isset($_GET['z'])) {
    if ($_GET['z'] == "NewPreg") {
        // Tomar los valores Cadena y la pregunta
        $str = $_GET['Str'];
        $Pregunta = $_GET['Pregunta'];
        //Insertar la pregunta a la BD
        insertData("INSERT INTO preguntas(Pregunta) VALUES ('" . $Pregunta . "')");
开发者ID:Gattoxs,项目名称:100_Ingenieros_dijeron,代码行数:31,代码来源:functions.php


示例19: isset

<?php

require "../include/init/init.php";
$id = isset($_GET["id"]) ? (int) $_GET["id"] : 1;
// 查询数据
$dataselect = editTable("SELECT * FROM jl_news WHERE news_id={$id}");
if ($_POST) {
    $name = trim($_POST["name"]) ? $_POST["name"] : "";
    $link = trim($_POST["link"]) ? $_POST["link"] : "";
    $description = trim($_POST["description"]) ? $_POST["description"] : "";
    $time = strtotime($_POST["time"]);
    updateTable("UPDATE jl_news SET \n      news_name='{$name}',\n      news_link='{$link}',\n      news_time='{$time}',\n      news_description='{$description}' WHERE news_id={$id}", "./news.php");
}
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="">
  <meta name="author" content="">
  <link rel="icon" href="">
  <title>金陵后台管理</title>
  <link href="../css/bootstrap.min.css" rel="stylesheet">
  <link href="../css/dashboard.css" rel="stylesheet">
</head>
<body>
  <?php 
require "../include/admin_header.php";
?>
开发者ID:Jeffery-Cai,项目名称:jinlingV1-1,代码行数:31,代码来源:news_edit.php


示例20: mysql_fetch_object

use Fototea\Config\FConfig;
use Fototea\Util\FMailer;
require '../vendor/autoload.php';
include_once '../scripts/libSM.php';
$user_email = $_REQUEST['user'];
$act_code = $_REQUEST['act-code'];
//action recover password
if ($_REQUEST['act'] == "recuperar") {
    $rs_user = mysql_fetch_object(listAll("user", "WHERE user = '{$user_email}'"));
    $to = $rs_user->user;
    $toName = $rs_user->name . ' ' . $rs_user->lastname;
    $asunto = "Recuperar contraseña";
    $params = array('site_url' => FConfig::getUrl(), 'logo_url' => FConfig::getUrl('images/logo_footer.png'), 'nombre' => $toName, 'recuperar_url' => FConfig::getUrl('reinicia-contrasena') . '?c=' . $rs_user->act_code);
    $body = FMailer::replaceParameters($params, file_get_contents('../views/emails/recuperarContrasenaEmail.html'));
    $mailer = new FMailer();
    $receivers = array(array('email' => $to, 'name' => $toName));
    $mailer->setReceivers($receivers);
    $mailer->sendEmail($asunto, $body);
    $arreglo[] = array('resp' => "Se ha enviado la información");
    echo json_encode($arreglo);
}
//action rest password
if ($_REQUEST['act'] == "reset") {
    $pass = sha1($_REQUEST['pass']);
    $rs_user2 = mysql_fetch_object(listAll("user", "WHERE act_code = '{$act_code}'"));
    $salt = $rs_user2->salt;
    $newPass = sha1($salt . $pass);
    updateTable("user", "password = '{$newPass}'", "act_code = '{$act_code}'");
    $arreglo[] = array('resp' => "Se ha enviado la información");
    echo json_encode($arreglo);
}
开发者ID:narbelys,项目名称:fototea,代码行数:31,代码来源:recuperarAction.php



注:本文中的updateTable函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP updateUser函数代码示例发布时间:2022-05-23
下一篇:
PHP updateStk函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap