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


PHP checkMySQLError函数代码示例

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


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

示例1: session_start

<?php

session_start();
require "accrp.php";
require "security/secure.php";
beginDocument("Main", $sess_user);
$db = getDBConnection();
beginPrettyTable("2", "Backup");
deldir("/tmp/accrpexport/");
mkdir("/tmp/accrpexport", 0333);
# 0333 does not work properly :-( so chmod ...
chmod("/tmp/accrpexport", 0733);
$result = mysql_query("SHOW TABLES FROM {$DBNAME}");
checkMySQLError();
while ($row = mysql_fetch_array($result, $db)) {
    $tablename = $row["Tables_in_accrp"];
    $filename = "/tmp/accrpexport/" . $tablename . ".txt";
    $query = "SELECT * FROM {$tablename} INTO OUTFILE \"{$filename}\"";
    $result2 = mysql_query($query, $db);
    checkMySQLError($query);
}
$today = get_today_srd_string();
$backup_filename = "accrp-datadump-{$today}.tar.gz";
exec("tar -czf /tmp/accrpexport/{$backup_filename} /tmp/accrpexport/*");
$doc_root = $_SERVER["DOCUMENT_ROOT"];
copy("/tmp/accrpexport/{$backup_filename}", "{$doc_root}/crp/backups/{$backup_filename}");
echo "<a href=\"backups/{$backup_filename}\"> click here to download datadump</a>";
endDocument();
开发者ID:k9ert,项目名称:ac4ngos,代码行数:28,代码来源:download_backup.php

示例2: checkMySQLError

        checkMySQLError();
        mysqlReport($result, "Employer sucessfully updated", "main.php", "Home");
        mysql_close($db);
    } else {
        $query = "INSERT INTO PERSONAL (EMP_NAME, DESIG_ID, STATUS, AC_NO, CONF_DT,JOIN_DT) VALUES ('{$emp_name}','{$desig_id}','{$status}', '{$ac_no}', '{$conf_dt}','{$join_dt}')";
        echo $query;
        $result = mysql_query($query, $db);
        checkMySQLError();
        mysqlReport($result, "Employer sucessfully added", "main.php", "Home");
        mysql_close($db);
    }
} else {
    $db = getDBConnection();
    if ($EMP_ID3) {
        $result = mysql_query("select * from PERSONAL where EMP_ID3 = {$EMP_ID3}");
        checkMySQLError();
        $edit = mysql_fetch_array($result);
    }
    $desig_array = get_designation_array();
    ?>
 
	<table cellpadding=5 cellspacing=0 border=0 width='100%'>
	 <tr>
	  <td valign=top width='15%'>
	
           <?php 
    beginPrettyTable("1");
    ?>
	   <tr>
	    <?php 
    echo "<td><a href='list_personal.php'>show List</a></td>";
开发者ID:k9ert,项目名称:ac4ngos,代码行数:31,代码来源:enter_personal.php

示例3: Accounts

 function Accounts($where_clause, $startdate, $enddate, $type_string)
 {
     $this->whereClause = $where_clause . " AND " . get_whereclause_for_accounts($type_string);
     $this->startdate = $startdate;
     $this->enddate = $enddate;
     $this->sum = 0;
     $this->finish_flag = 0;
     $db = getDBConnection();
     $query = "SELECT * FROM `AC_CODE5` WHERE {$this->whereClause}";
     #echo "$query<br>";
     $this->result = mysql_query($query, $db);
     checkMySQLError("Accounts");
 }
开发者ID:k9ert,项目名称:ac4ngos,代码行数:13,代码来源:accrp.php


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