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


PHP mysqlConnection::close方法代码示例

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


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

示例1: insertMember

 function insertMember($host, $user, $pass, $database, $table)
 {
     $query = "INSERT INTO {$table} (ime,prezime,adresa,postnum,mjesto,telefon,email,skola,clan,auto,izlet,majica,boja,velicina,user,password) VALUES ('{$this->ime}', '{$this->prezime}', '{$this->adresa}', '{$this->brojPoste}', '{$this->mjesto}', '{$this->telefon}', '{$this->email}', '{$this->skola}', '{$this->clan}', '{$this->auto}', '{$this->izlet}', '{$this->majica}', '{$this->boja}', '{$this->velicina}', '{$this->username}', '" . md5($this->password) . "')";
     try {
         $conn = new mysqlConnection($host, $user, $pass, $database);
         $conn->open();
         mysql_query($query);
         $success = true;
         $conn->close();
         unset($conn);
     } catch (Exception $e) {
         echo $e->getMessage();
         $success = false;
     }
     return $success;
 }
开发者ID:zvrabec,项目名称:prijavnica,代码行数:16,代码来源:sudionik.php

示例2: unset

            unset($sudionik);
            echo "<SCRIPT LANGUAGE='javascript'>window.alert ('Prijava uspje¹no izvr¹ena! Na email koji ste unijeli stiæi æe vam ostale upute.'); window.open('index.php','_self');</SCRIPT>";
        } else {
            unset($sudionik);
            echo "<SCRIPT LANGUAGE='javascript'>window.alert ('Gre¹ka prilikom prijave!'); window.open('index.php','_self');</SCRIPT>";
        }
        $tip = NULL;
        break;
    case "login":
        $username = $_REQUEST["txtUserName"];
        $password = $_REQUEST["txtPassword"];
        $conn = new mysqlConnection($dbhostname, $dbusername, $dbpassword, $dbname);
        $conn->open();
        if (!validateLoginData($username, $password, $conn->dbconnection)) {
            echo "<SCRIPT LANGUAGE='javascript'>window.alert ('Pogre¹no upisani podaci ili niste prijavljeni na skup!'); window.open('index.php','_self');</SCRIPT>";
            $conn->close();
            unset($conn);
        } else {
            if (isAdmin($username)) {
                $query = "SELECT ime, prezime, adresa, postnum, mjesto, telefon, email, skola, clan, auto, izlet, majica, boja, velicina, user FROM " . $dbtbl;
                $result = mysql_query($query);
                if (mysql_num_rows($result) <= 0) {
                    $conn->close();
                    unset($conn);
                    echo "<SCRIPT LANGUAGE='javascript'>window.alert ('Nema zapisa!');window.open('index.php','_self');</SCRIPT>";
                } else {
                    echo '
					<html>
					<head>
					<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
					<link rel="stylesheet" type="text/css" href="css/style.css" />
开发者ID:zvrabec,项目名称:prijavnica,代码行数:31,代码来源:handle_data.php


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