当前位置: 首页>>代码示例>>PHP>>正文


PHP MySQL::Insert方法代码示例

本文整理汇总了PHP中MySQL::Insert方法的典型用法代码示例。如果您正苦于以下问题:PHP MySQL::Insert方法的具体用法?PHP MySQL::Insert怎么用?PHP MySQL::Insert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MySQL的用法示例。


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

示例1: MySQL

<?php

require 'mysql.class.php';
if (isset($_GET)) {
    $my = new MySQL();
    $myo = new MySQLi('localhost', 'root', 'root', 'codefundo');
    $some = $_GET['title'];
    unset($_GET['title']);
    if ($my->Insert("marks", $_GET)) {
        print_r('Marks Set!');
    }
    evulato($some);
}
开发者ID:prannayk,项目名称:codefundo,代码行数:13,代码来源:marks.php

示例2: MySQL

<?php

require 'mysql.class.php';
if (isset($_POST)) {
    $my = new MySQL();
    unset($_POST['title']);
    if ($my->Insert("answers", $_POST)) {
        print_r('Answers Set!');
    }
}
开发者ID:prannayk,项目名称:codefundo,代码行数:10,代码来源:answers.php

示例3: MySQL

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
</head>
<body>
<?php 
if (!empty($_POST["submit"])) {
    require_once "class.MySQL.php";
    $dbhost = 'localhost';
    $dbuser = 'root';
    $dbpass = '';
    $dbname = 'test';
    $oMySQL = new MySQL($dbname, $dbuser, $dbpass, $dbhost);
    session_start();
    $flds = array("firstName" => $_SESSION["fname"], "lastName" => $_SESSION["lname"], "emailAddr" => $_SESSION["email"], "address1" => $_SESSION["addr1"], "address2" => $_SESSION["addr2"], "suburb" => $_SESSION["suburb"], "postcode" => $_SESSION["postcode"], "country" => $_SESSION["country"], "fb_id" => $_SESSION["fb_id"], "in_id" => $_SESSION["in_id"]);
    $oMySQL->Insert($flds, "jobapplication");
    header('Location:thanks.php');
    exit;
}
?>
<div class="container">
	<h2>Online Job Application - Confirmation</h2>
	<div class="panel panel-default">
		<div class="panel-heading">Thanks!</div>
		<div class="panel-body">
			<label for="thanks">Thank you for submitting your application. Our recruitment team will be getting in touch with you in the next coming few days.</label>
		</div>
	</div>	
</div>	
</body>
</html>
开发者ID:ask2techconsulting,项目名称:LAMP,代码行数:31,代码来源:thanks.php

示例4: Insert

	function Insert ($table, $data)
	{
		if (DATABASE_TYPE == "PGSQL")
		{
			return PGSQL::Insert ($table, $data);
		}
		elseif (DATABASE_TYPE == "MYSQL")
		{
			return MySQL::Insert ($table, $data);
		}
	}
开发者ID:sotonin,项目名称:Sparkle-PHP-Framework,代码行数:11,代码来源:Database.php

示例5: MySQL

<?php

if (isset($_POST['tit'])) {
    require "mysql.class.php";
    $mysql = new MySQL();
    $some = $_POST['tit'];
    $some2 = $_POST['count'];
    unset($_POST['count']);
    $mysql->Insert("code", $_POST);
    $my = new MySQLi('localhost', 'root', 'root', 'codefundo');
    $r = "SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = 'codefundo' AND table_name = 'students'";
    $q = $my->query($r);
    $some3 = "";
    if ($q) {
        while ($var = $q->fetch_object()) {
            foreach ($var as $key => $value) {
                $some3 = $value;
            }
        }
    }
    if ($some3 == 0 || $some3 == "0") {
        $some2 = intval($some2);
        $que = "CREATE TABLE " . $some . " ( id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY";
        for ($i = 1; $i <= $some2; $i++) {
            $que = $que . ", col" . $i . " VARCHAR(10) NOT NULL";
        }
        $que = $que . ")";
        if ($my->query($que)) {
            header("Location: user.php");
        }
    }
开发者ID:prannayk,项目名称:codefundo,代码行数:31,代码来源:create.php

示例6: MySQL

require_once ENGINE_DIR . '/config/config.php';
require_once ENGINE_DIR . '/config/dbconfig.php';
require_once ENGINE_DIR . '/classes/class.mysql.php';
$dataMySQL = new MySQL();
$_dateend = date('Y-m-d', time());
$query = "SELECT * from `" . DB_PREFIX . "tvusers` WHERE status=1 AND end < '" . $_dateend . "';";
$seldata = $dataMySQL->ExecuteSQL($query);
$seldataArray = $dataMySQL->ArrayResults();
for ($i = 0; $i < count($seldataArray); $i++) {
    $lnn = array();
    $dataMySQL->ExecuteSQL("UPDATE `ip_tvusers` SET `status` =  '0' WHERE `id` =" . $seldataArray[$i]['id']);
    $lnn[] = file_get_contents("http://192.168.174.23:83/api.php?key=YT56BH3I9T7BDKJ72NG93BF73NAKGWGFHON82NA&s=deactivate&ip=" . $seldataArray[$i]['ip']);
    $lnn[] = file_get_contents("http://192.168.174.25:83/api.php?key=YT56BH3I9T7BDKJ72NG93BF73NAKGWGFHON82NA&s=deactivate&ip=" . $seldataArray[$i]['ip']);
    $content .= implode(' ', $lnn);
    $Ilog = array('login' => ADMINLOGIN, 'type' => 'success', 'action' => 'deactivation', 'message' => "АВТО-Деактивация ТВ-пользователя id" . $seldataArray[$i]['id'] . " " . $seldataArray[$i]['ip'] . " " . implode(' ', $lnn));
    if (!$dataMySQL->Insert($Ilog, DB_PREFIX . "logs")) {
        $errors[] = "Ошибка добавления лога";
    }
}
unset($seldataArray);
/*	Генерайция новой конфигурации	*/
$nameTablE_T = "ip_tvusers";
$nameTablE_U = "ip_users";
//$query="SELECT ip_tvusers.id,ip_tvusers.F,ip_tvusers.ip,ip_users.mac from ip_tvusers,ip_users WHERE ip_tvusers.status =1 AND ip_users.ip=ip_tvusers.ip ORDER BY s_net, s_ip;";
$query = "SELECT ip_tvusers.id,ip_tvusers.F,ip_tvusers.ip from ip_tvusers WHERE ip_tvusers.status =1 ORDER BY F;";
$seldata = $dataMySQL->ExecuteSQL($query);
$seldataArray = $dataMySQL->ArrayResults();
$g = '
<?php
if($_GET[\'key\']=="HLNKKE69BH7VMG3APB0NSQ8NFL5MCZ4PEM2KWLQ")
{
开发者ID:proea,项目名称:IPManager.pro,代码行数:31,代码来源:deactivate.php


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