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

PHP begin函数代码示例

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

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



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

示例1: crearItemsDeCarga

 function crearItemsDeCarga($id)
 {
     begin();
     if ($this->cargaExists($id)) {
         if (!$this->eliminarItemsDeCarga($id)) {
             rollback();
         }
     }
     $sql = "INSERT INTO cargas (id_reparto, id_producto, cantidad, fecha_update)\n                SELECT  t1.id_reparto, \n                        t4.id_producto,\n                        SUM(t3.cantidad_detalle_venta) cantidad,\n                        NOW()\n                FROM repartos t1\n                INNER JOIN ventas t2 ON t1.id_reparto=t2.id_reparto\n                INNER JOIN detalle_ventas t3 ON t2.id_venta=t3.id_venta\n                INNER JOIN productos t4 ON t3.id_producto=t4.id_producto\n                WHERE t1.id_reparto != 1 AND t1.id_reparto = {$id}\n                GROUP BY t4.id_producto\n                ORDER BY detalle_producto";
     if (!mysql_query($sql)) {
         die('Error: ' . mysql_error());
         rollback();
         return false;
     } else {
         commit();
         return true;
     }
 }
开发者ID:sugarnet,项目名称:feanor-sg1,代码行数:18,代码来源:ExpertoRepartos.php


示例2: begin

function begin()
{
    echo "\r\n+------------------------\r\n| [ 1 ] 生成Model \r\n| [ 2 ] 生成Action  \r\n| [ 0 ] 退出\r\n+------------------------\r\n输入数字选择:";
    $number = trim(fgets(STDIN, 256));
    //fscanf(STDIN, "%d\n", $number); // 从 STDIN 读取数字
    switch ($number) {
        case 0:
            break;
        case 1:
            echo "输入Model名称[例如 User,留空生成当前数据库的全部Model类 ]:";
            $model = trim(fgets(STDIN, 256));
            if (strpos($model, ',')) {
                echo "批量生成Model...\n";
                $models = explode(',', $model);
                foreach ($models as $model) {
                    buildModel($model);
                }
            } else {
                // 生成指定的Model类
                buildModel($model);
            }
            begin();
            break;
        case 2:
            // 生成指定的Action类
            echo "输入Action名称[例如 User ]:";
            $action = trim(fgets(STDIN, 256));
            buildAction($action);
            begin();
            break;
        default:
            begin();
    }
}
开发者ID:skiman100,项目名称:thinksns,代码行数:34,代码来源:common.php


示例3: insert_sql_data

function insert_sql_data( $db_conn, $p_campaigns, $p_headers, $p_details )
// insert the header and detail data into the file
// with appropriate safeguards to ensure full 
// completion or rollback of the transaction.
{
GLOBAL $msg_log;

	$success = TRUE;
// Wrap all this in a transaction
// First, turn off autocommit
	$qry = "set autocommit=0";
//pre_echo( $qry );
	$success = mysql_query( $qry, $db_conn );

// Second, take care of all ALTER TABLE queries.  Due to a (documented)
// glitch in MySQL, these commands force a transaction to commit, 
// which sucks.

	if ($success) 
	{ // Create the temp_header table
		$qry = "CREATE TEMPORARY TABLE temp_header LIKE contract_header";
//pre_echo( $qry );
		$success = mysql_query( $qry, $db_conn );
		if (!$success) 
		{
			message_log_append( $msg_log, mysql_error( $db_conn ), MSG_LOG_ERROR );
		}
	}

	if ($success) 
	{ // Create the temp_detail table
		$qry = "CREATE TEMPORARY TABLE temp_detail LIKE contract_detail";
//pre_echo( $qry );
		$success = mysql_query( $qry, $db_conn );
		if (!$success)
		{
			message_log_append( $msg_log, mysql_error( $db_conn ), MSG_LOG_ERROR );
		}
	}

	if ($success) 
	{ // Delete the Seq field from table temp_header
		$qry = "ALTER TABLE temp_header DROP COLUMN Seq";
//pre_echo( $qry );
		$success = mysql_query( $qry, $db_conn );
		if (!$success)
		{
			message_log_append( $msg_log, mysql_error( $db_conn ), MSG_LOG_ERROR );
		}
	}

    if ($success) 
	{ // Delete the Line column from table temp_detail
		$qry = "ALTER TABLE temp_detail DROP COLUMN Line";
//pre_echo( $qry );
		$success = mysql_query( $qry, $db_conn );
		if (!$success)
		{
			message_log_append( $msg_log, mysql_error( $db_conn ), MSG_LOG_ERROR );
		}
	}

// loop through the campaigns, headers, and details to insert the
// data into the SQL database.  Keep solid track of all error
// results so that we can ROLLBACK on any error.
	if ($success) 
	{
//echo "<pre>";
//var_dump( $p_campaigns );  echo "</pre><br>";
		$success = begin( $db_conn );
		if (!$success)
		{
			message_log_append( $msg_log, "Error in START TRANSACTION: " . mysql_error( $db_conn ), MSG_LOG_ERROR );
		}
	}

// do the work here, and keep track of $success
// If we need to create a new agency record, do that here.
	$new_agency = FALSE;
	if ($success && is_null( $p_campaigns[0][ 'Agency Record' ])) 
	{
		$agent_name = $p_campaigns[0][ 'Agency Name' ];
		$rate = DEFAULT_AGENCY_RATE / 10;
		if ($success = agency_insert( $db_conn, $agent_name, $rate, $aindex )) 
		{
			$p_campaigns[0][ 'Agency Record' ] = agency_record( $agent_name, OPERATOR_NAME );
			$success = !is_null( $p_campaigns[0][ 'Agency Record' ]);
		} // if agency_insert
		if ($success) 
		{
			$new_agency = TRUE;
			message_log_append( $msg_log, "Agency created: " .
			"Seq = $aindex, Name = '$agent_name'", MSG_LOG_WARNING );
		} 
		else 
		{
			message_log_append( $msg_log, "Error while creating " . "Agency '$agent_name': " . mysql_error( $db_conn ), MSG_LOG_ERROR );
		}
	} // if null agency record

//.........这里部分代码省略.........
开发者ID:agundran,项目名称:addige,代码行数:101,代码来源:insert_sql.php


示例4: save

 function save($oData)
 {
     if (!$oData["id_orden_compra"]) {
         begin();
         $detalle = array();
         $cabecera = array();
         $cabecera = explode("@@", $oData["cabecera"]);
         $detalle = explode("||", $oData["detalle"]);
         $sql = "INSERT INTO  ordenes_compra (id_proveedor, fecha_orden_compra, nro_orden_compra, generada)\r\n\t\t\t\t\tVALUES (" . $cabecera[0] . ", '" . dateToMySQL($cabecera[1]) . "', " . $cabecera[2] . ", 1)";
         if (!mysql_query($sql)) {
             die('Error: ' . mysql_error());
             rollback();
             return false;
         } else {
             $id = mysql_insert_id();
             foreach ($detalle as $detail) {
                 $values = explode("@@", $detail);
                 $sql = "INSERT INTO detalle_ordenes_compra (id_orden_compra, id_producto, cantidad_detalle_orden_compra) VALUES  (" . $id . ", " . $values[0] . ", " . $values[1] . ")";
                 if (!mysql_query($sql)) {
                     die('Error: ' . mysql_error());
                     rollback();
                     break;
                 }
             }
             if ($cabecera[2]) {
                 $nroVta = $cabecera[2] + 1;
             }
             $sql = "UPDATE parametros SET valor_parametro = " . $nroVta . " WHERE nombre_parametro='nro_orden_compra'";
             if (!mysql_query($sql)) {
                 die('Error: ' . mysql_error());
                 rollback();
                 break;
             } else {
                 commit();
                 return true;
             }
             return false;
         }
     } else {
         $sql = "delete from detalle_ordenes_compra where id_orden_compra=" . $oData["id_orden_compra"];
         getRS($sql);
         $sql = "delete from ordenes_compra where id_orden_compra=" . $oData["id_orden_compra"];
         getRS($sql);
         begin();
         $detalle = array();
         $cabecera = array();
         $cabecera = explode("@@", $oData["cabecera"]);
         $detalle = explode("||", $oData["detalle"]);
         $sql = "INSERT INTO  ordenes_compra (id_proveedor, fecha_orden_compra, nro_orden_compra, generada)\r\n\t\t\t\t\tVALUES (" . $cabecera[0] . ", '" . dateToMySQL($cabecera[1]) . "', " . $cabecera[2] . ", 1)";
         if (!mysql_query($sql)) {
             die('Error: ' . mysql_error());
             rollback();
             return false;
         } else {
             $id = mysql_insert_id();
             foreach ($detalle as $detail) {
                 $values = explode("@@", $detail);
                 $sql = "INSERT INTO detalle_ordenes_compra (id_orden_compra, id_producto, cantidad_detalle_orden_compra) VALUES  (" . $id . ", " . $values[0] . ", " . $values[1] . ")";
                 if (!mysql_query($sql)) {
                     die('Error: ' . mysql_error());
                     rollback();
                     break;
                 }
             }
             if ($cabecera[2]) {
                 $nroVta = $cabecera[2] + 1;
             }
             $sql = "UPDATE parametros SET valor_parametro = " . $nroVta . " WHERE nombre_parametro='nro_orden_compra'";
             if (!mysql_query($sql)) {
                 die('Error: ' . mysql_error());
                 rollback();
                 break;
             } else {
                 commit();
                 return true;
             }
             return false;
         }
     }
 }
开发者ID:sugarnet,项目名称:feanor-sg1,代码行数:80,代码来源:ExpertoOrdenes.php


示例5: begin

function begin($startX, $startY)
{
    if ($startY > 0 && $startY == $startX) {
        begin($startY - 1, $startY - 1, $board);
    }
    if ($startX > 0) {
        begin($startX - 1, $startY, $board);
    }
    $board = newBoard();
    $board[$startY][$startX] = 1;
    //the first move location will be "1"
    echo "Starting at: (" . $startY . "," . $startX . ")\n";
    $solution = solve($board, $startY, $startX, 2);
}
开发者ID:valdas,项目名称:knit,代码行数:14,代码来源:knights.php


示例6: do_install

function do_install()
{
    // {{{
    if (isset($_POST['database_type']) && isset($_POST['database_host']) && isset($_POST['database_user']) && isset($_POST['database_name'])) {
        global $database_dsn;
        $database_dsn = "{$_POST['database_type']}:user={$_POST['database_user']};password={$_POST['database_password']};host={$_POST['database_host']};dbname={$_POST['database_name']}";
        install_process();
    } else {
        if (file_exists("auto_install.conf")) {
            install_process(trim(file_get_contents("auto_install.conf")));
            unlink("auto_install.conf");
        } else {
            begin();
        }
    }
}
开发者ID:nsuan,项目名称:shimmie2,代码行数:16,代码来源:install.php


示例7: rewind

 public function rewind()
 {
     begin($this->_config);
 }
开发者ID:Nivl,项目名称:Ninaca,代码行数:4,代码来源:Configuration.php


示例8: lexer_performAction

 function lexer_performAction(&$yy, $yy_, $avoiding_name_collisions, $YY_START = null)
 {
     $YYSTATE = $YY_START;
     switch ($avoiding_name_collisions) {
         case 0:
             return 15;
             break;
         case 1:
             return 15;
             break;
         case 2:
             this . popState();
             this . begin('STRING');
             return 11;
             break;
         case 3:
             this . popState();
             return 15;
             break;
         case 4:
             this . begin('SINGLE_QUOTE_ON');
             return 'SINGLE_QUOTE_ON';
             break;
         case 5:
             this . begin('SINGLE_QUOTE_ON');
             return 10;
             break;
         case 6:
             return 15;
             break;
         case 7:
             return 15;
             break;
         case 8:
             this . popState();
             this . begin('STRING');
             return 11;
             break;
         case 9:
             this . popState();
             return 15;
             break;
         case 10:
             this . begin('DOUBLE_QUOTE_ON');
             return 10;
             break;
         case 11:
             this . begin('DOUBLE_QUOTE_ON');
             return 10;
             break;
         case 12:
             return 14;
             break;
         case 13:
             this . popState();
             return 7;
             break;
         case 14:
             this . popState();
             return 13;
             break;
         case 15:
             return 12;
             break;
         case 16:
             return 15;
             break;
         case 17:
             return 15;
             break;
         case 18:
             return 15;
             break;
         case 19:
             return 15;
             break;
         case 20:
             return 8;
             break;
         case 21:
             this . begin('STRING');
             return 15;
             break;
         case 22:
             return 5;
             break;
     }
 }
开发者ID:gokhanbhs,项目名称:jquerysheet,代码行数:88,代码来源:tsv.php


示例9: begin

<?php

/* 
 * The MIT License
 *
 * Copyright 2015 ekow.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
begin()->table('some_table')->column('id')->type('integer')->nulls(false)->column('some_field')->type('string')->column('another_field')->type('string')->primaryKey('id')->autoIncrement()->end();
开发者ID:codogh,项目名称:yentu,代码行数:26,代码来源:12345678901234_some_table.php


示例10: saveIndiceEstacional

 function saveIndiceEstacional($oData)
 {
     begin();
     $sql = "SELECT * FROM indices_estacionales WHERE id_producto = " . $oData["id_producto"];
     $result = getRS($sql);
     if (!getNrosRows($result)) {
         $dur_periodo = $this->getDuracionPeriodo();
         $cant_dias_anio = date("z", mktime(0, 0, 0, 12, 31, date("Y"))) + 1;
         $periodo_x_anio = number_format($cant_dias_anio / $dur_periodo);
         for ($i = 0; $i < $periodo_x_anio; $i++) {
             if ($i + 1 == $oData["nro_estacion"]) {
                 $sql = "INSERT INTO indices_estacionales (id_producto, orden, valor) VALUES (" . $oData["id_producto"] . "," . ($i + 1) . ", " . $oData["indice_estacional"] . ")";
             } else {
                 $sql = "INSERT INTO indices_estacionales (id_producto, orden) VALUES (" . $oData["id_producto"] . "," . ($i + 1) . ")";
             }
             $rs = getRS($sql);
             if (!$rs) {
                 die('Error: ' . mysql_error());
                 rollback();
             } else {
                 commit();
             }
         }
     } else {
         $sql = "SELECT * FROM indices_estacionales WHERE id_producto = " . $oData["id_producto"] . " and orden = " . $oData["nro_estacion"];
         $result = getRS($sql);
         if (!getNrosRows($result)) {
             $sql = "INSERT INTO indices_estacionales (id_producto, orden, valor) VALUES (" . $oData["id_producto"] . "," . $oData["nro_estacion"] . ", " . $oData["indice_estacional"] . ")";
             $rs = getRS($sql);
             if (!$rs) {
                 die('Error: ' . mysql_error());
                 rollback();
             }
         } else {
             $sql = "UPDATE indices_estacionales SET valor = " . $oData["indice_estacional"] . " WHERE id_producto = " . $oData["id_producto"] . " AND orden = " . $oData["nro_estacion"];
             $rs = getRS($sql);
             if (!$rs) {
                 die('Error: ' . mysql_error());
                 rollback();
             }
         }
     }
 }
开发者ID:sugarnet,项目名称:feanor-sg1,代码行数:43,代码来源:ExpertoPrediccion.php


示例11: begin

<?php

/* 
 * The MIT License
 *
 * Copyright 2014 ekow.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
begin()->table('users')->column('branch_id')->type('integer')->nulls(true)->column('picture_id')->type('integer')->nulls(true)->column('department_id')->type('integer')->nulls(true)->column('phone')->type('string')->nulls(true)->column('email')->type('string')->nulls(false)->column('user_status')->type('double')->nulls(true)->column('other_names')->type('string')->nulls(true)->column('last_name')->type('string')->nulls(false)->column('first_name')->type('string')->nulls(false)->column('role_id')->type('integer')->nulls(true)->column('password')->type('string')->nulls(false)->column('user_name')->type('string')->nulls(false)->column('user_id')->type('integer')->nulls(false)->primaryKey('user_id')->name('user_id_pk')->autoIncrement()->unique('user_name')->name('user_name_uk')->table('roles')->column('role_name')->type('string')->nulls(true)->column('role_id')->type('integer')->nulls(false)->primaryKey('role_id')->name('role_id_pk')->autoIncrement()->table('departments')->column('department_name')->type('string')->nulls(false)->column('department_id')->type('integer')->nulls(false)->primaryKey('department_id')->name('department_id_pk')->autoIncrement()->table('temporary_roles')->column('tag')->type('string')->nulls(true)->column('original_role_id')->type('integer')->nulls(true)->column('active')->type('boolean')->nulls(true)->column('expires')->type('timestamp')->nulls(true)->column('created')->type('timestamp')->nulls(true)->column('user_id')->type('integer')->nulls(true)->column('new_role_id')->type('integer')->nulls(true)->column('temporary_role_id')->type('integer')->nulls(false)->primaryKey('temporary_role_id')->name('temporary_role_id_pk')->autoIncrement()->table('suppliers')->column('user_id')->type('integer')->nulls(true)->column('telephone')->type('string')->nulls(true)->column('address')->type('string')->nulls(true)->column('supplier_name')->type('string')->nulls(false)->column('supplier_id')->type('integer')->nulls(false)->primaryKey('supplier_id')->name('supplier_id_pk')->autoIncrement()->table('countries')->column('currency_symbol')->type('string')->nulls(true)->column('currency')->type('string')->nulls(true)->column('nationality')->type('string')->nulls(true)->column('country_code')->type('string')->nulls(true)->column('country_name')->type('string')->nulls(false)->column('country_id')->type('integer')->nulls(false)->primaryKey('country_id')->name('country_id_pk')->autoIncrement()->unique('country_name')->name('country_name_uk')->table('permissions')->column('module')->type('string')->nulls(true)->column('value')->type('double')->nulls(false)->column('permission')->type('string')->nulls(true)->column('role_id')->type('integer')->nulls(false)->column('permission_id')->type('integer')->nulls(false)->primaryKey('permission_id')->name('perm_id_pk')->autoIncrement()->table('notes')->column('user_id')->type('integer')->nulls(false)->column('item_type')->type('string')->nulls(false)->column('item_id')->type('integer')->nulls(false)->column('note_time')->type('timestamp')->nulls(false)->column('note')->type('string')->nulls(true)->column('note_id')->type('integer')->nulls(false)->primaryKey('note_id')->name('notes_note_id_pk')->autoIncrement()->table('regions')->column('country_id')->type('integer')->nulls(false)->column('name')->type('string')->nulls(false)->column('region_code')->type('string')->nulls(false)->column('region_id')->type('integer')->nulls(false)->primaryKey('region_id')->name('region_id_pk')->autoIncrement()->unique('name')->name('region_name_uk')->table('note_attachments')->column('object_id')->type('integer')->nulls(true)->column('note_id')->type('integer')->nulls(true)->column('description')->type('string')->nulls(true)->column('note_attachment_id')->type('integer')->nulls(false)->primaryKey('note_attachment_id')->name('note_attachments_pkey')->autoIncrement()->table('branches')->column('city_id')->type('integer')->nulls(true)->column('address')->type('text')->nulls(true)->column('branch_name')->type('string')->nulls(false)->column('branch_id')->type('integer')->nulls(false)->primaryKey('branch_id')->name('branches_pkey')->autoIncrement()->table('clients')->column('branch_id')->type('integer')->nulls(false)->column('marital_status')->type('double')->nulls(true)->column('gender')->type('double')->nulls(true)->column('nationality_id')->type('integer')->nulls(true)->column('company_name')->type('string')->nulls(true)->column('contact_person')->type('string')->nulls(true)->column('in_trust_for')->type('string')->nulls(true)->column('country_id')->type('integer')->nulls(true)->column('id_issue_date')->type('date')->nulls(true)->column('id_issue_place')->type('string')->nulls(true)->column('signature')->type('string')->nulls(true)->column('scanned_id')->type('string')->nulls(true)->column('picture')->type('string')->nulls(true)->column('occupation')->type('string')->nulls(true)->column('residential_status')->type('double')->nulls(true)->column('id_number')->type('string')->nulls(false)->column('id_type_id')->type('integer')->nulls(false)->column('city_id')->type('integer')->nulls(true)->column('birth_date')->type('date')->nulls(true)->column('email')->type('string')->nulls(true)->column('fax')->type('string')->nulls(true)->column('mobile')->type('string')->nulls(true)->column('contact_tel')->type('string')->nulls(true)->column('residential_address')->type('string')->nulls(true)->column('mailing_address')->type('string')->nulls(false)->column('previous_names')->type('string')->nulls(true)->column('other_names')->type('string')->nulls(true)->column('first_name')->type('string')->nulls(true)->column('surname')->type('string')->nulls(true)->column('title')->type('string')->nulls(true)->column('account_type')->type('double')->nulls(false)->column('main_client_id')->type('integer')->nulls(false)->primaryKey('main_client_id')->name('clients_main_client_id_pk')->autoIncrement()->table('identification_types')->column('id_name')->type('string')->nulls(false)->column('id_type_id')->type('integer')->nulls(false)->primaryKey('id_type_id')->name('id_type_id_pk')->autoIncrement()->table('client_users')->column('status')->type('integer')->nulls(false)->column('user_name')->type('string')->nulls(false)->column('password')->type('string')->nulls(false)->column('membership_id')->type('integer')->nulls(true)->column('main_client_id')->type('integer')->nulls(true)->column('client_user_id')->type('integer')->nulls(false)->primaryKey('client_user_id')->name('client_users_client_user_id_pk')->autoIncrement()->table('client_joint_accounts')->column('mobile')->type('string')->nulls(true)->column('id_issue_date')->type('date')->nulls(true)->column('id_issue_place')->type('string')->nulls(true)->column('id_number')->type('string')->nulls(true)->column('id_type_id')->type('integer')->nulls(true)->column('office_telephone')->type('string')->nulls(true)->column('telephone')->type('string')->nulls(true)->column('address')->type('string')->nulls(true)->column('previous_names')->type('string')->nulls(true)->column('other_names')->type('string')->nulls(true)->column('first_name')->type('string')->nulls(false)->column('surname')->type('string')->nulls(false)->column('title')->type('string')->nulls(true)->column('main_client_id')->type('integer')->nulls(false)->column('joint_account_id')->type('integer')->nulls(false)->primaryKey('joint_account_id')->name('joint_account_id_pk')->autoIncrement()->table('cities')->column('region_id')->type('integer')->nulls(false)->column('city_name')->type('string')->nulls(false)->column('city_id')->type('integer')->nulls(false)->primaryKey('city_id')->name('city_id_pk')->autoIncrement()->unique('city_name')->name('city_name_uk')->table('bank_branches')->column('sort_code')->type('string')->nulls(false)->defaultValue("0")->column('address')->type('string')->nulls(true)->column('branch_name')->type('string')->nulls(false)->column('bank_id')->type('integer')->nulls(false)->column('bank_branch_id')->type('integer')->nulls(false)->primaryKey('bank_branch_id')->name('bank_branch_id_pk')->autoIncrement()->table('banks')->column('swift_code')->type('string')->nulls(true)->defaultValue("0")->column('bank_code')->type('string')->nulls(false)->defaultValue("0")->column('bank_name')->type('string')->nulls(false)->column('bank_id')->type('integer')->nulls(false)->primaryKey('bank_id')->name('bank_id_pk')->autoIncrement()->unique('bank_name')->name('bank_name_uk')->table('api_keys')->column('secret')->type('string')->nulls(false)->column('key')->type('string')->nulls(false)->column('active')->type('boolean')->nulls(false)->column('user_id')->type('integer')->nulls(false)->column('api_key_id')->type('integer')->nulls(false)->primaryKey('api_key_id')->name('api_keys_pkey')->autoIncrement()->table('relationships')->column('relationship_name')->type('string')->nulls(false)->column('relationship_id')->type('integer')->nulls(false)->primaryKey('relationship_id')->name('relationship_id_pk')->autoIncrement()->table('notifications')->column('subject')->type('string')->nulls(true)->column('email')->type('text')->nulls(true)->column('sms')->type('text')->nulls(true)->column('tag')->type('string')->nulls(true)->column('notification_id')->type('integer')->nulls(false)->primaryKey('notification_id')->name('notifications_pkey')->autoIncrement()->table('holidays')->column('holiday_date')->type('date')->nulls(false)->column('name')->type('string')->nulls(false)->column('holiday_id')->type('integer')->nulls(false)->primaryKey('holiday_id')->name('holidays_holiday_id_pk')->autoIncrement()->table('configurations')->column('value')->type('string')->nulls(true)->column('key')->type('string')->nulls(true)->column('configuration_id')->type('integer')->nulls(false)->primaryKey('configuration_id')->name('configuration_id_pk')->autoIncrement()->unique('key')->name('key_uk')->table('cheque_formats')->column('data')->type('text')->nulls(false)->column('description')->type('string')->nulls(false)->column('cheque_format_id')->type('integer')->nulls(false)->primaryKey('cheque_format_id')->name('cheque_formats_cheque_format_id_pk')->autoIncrement()->table('binary_objects')->column('data')->type('blob')->nulls(true)->column('object_id')->type('integer')->nulls(false)->primaryKey('object_id')->name('binary_objects_pkey')->autoIncrement()->table('audit_trail_data')->column('data')->type('text')->nulls(true)->column('audit_trail_id')->type('integer')->nulls(false)->column('audit_trail_data_id')->type('integer')->nulls(false)->primaryKey('audit_trail_data_id')->name('audit_trail_data_id_pk')->autoIncrement()->index('audit_trail_id')->name('audit_trail_id_idx')->table('audit_trail')->column('data')->type('text')->nulls(true)->column('type')->type('double')->nulls(false)->column('audit_date')->type('timestamp')->nulls(false)->column('description')->type('string')->nulls(false)->column('item_type')->type('string')->nulls(false)->column('item_id')->type('integer')->nulls(false)->column('user_id')->type('integer')->nulls(false)->column('audit_trail_id')->type('integer')->nulls(false)->primaryKey('audit_trail_id')->name('audit_trail_audit_id_pk')->autoIncrement()->index('item_id')->name('audit_trail_item_id_idx')->table('locations')->column('address')->type('string')->nulls(true)->column('name')->type('string')->nulls(true)->column('location_id')->type('integer')->nulls(false)->primaryKey('location_id')->name('location_id_pk')->autoIncrement()->view('users_view')->definition("SELECT * FROM users JOIN roles USING (role_id)")->view('countries_view')->definition("SELECT * FROM countries JOIN regions USING (country_id)")->table('users')->foreignKey('branch_id')->references(reftable('branches'))->columns('branch_id')->table('users')->foreignKey('department_id')->references(reftable('departments'))->columns('department_id')->table('users')->foreignKey('role_id')->references(reftable('roles'))->columns('role_id')->name('users_role_id_fk')->table('temporary_roles')->foreignKey('new_role_id')->references(reftable('roles'))->columns('role_id')->name('temporary_rol_new_role_id_fk')->table('temporary_roles')->foreignKey('original_role_id')->references(reftable('roles'))->columns('role_id')->name('temporary_rol_orig_role_id_fk')->table('temporary_roles')->foreignKey('user_id')->references(reftable('users'))->columns('user_id')->name('temporary_roles_user_id_fk')->table('suppliers')->foreignKey('user_id')->references(reftable('users'))->columns('user_id')->name('suppliers_user_id_fk')->table('permissions')->foreignKey('role_id')->references(reftable('roles'))->columns('role_id')->name('permissios_role_id_fk')->table('notes')->foreignKey('user_id')->references(reftable('users'))->columns('user_id')->name('notes_user_id_fk')->table('regions')->foreignKey('country_id')->references(reftable('countries'))->columns('country_id')->name('regions_country_id_fk')->table('note_attachments')->foreignKey('note_id')->references(reftable('notes'))->columns('note_id')->name('note_attachments_note_id_fkey')->table('clients')->foreignKey('branch_id')->references(reftable('branches'))->columns('branch_id')->name('clients_branch_id_fkey')->table('clients')->foreignKey('city_id')->references(reftable('cities'))->columns('city_id')->name('clients_city_id_fk')->table('clients')->foreignKey('country_id')->references(reftable('countries'))->columns('country_id')->name('clients_country_id_fk')->table('clients')->foreignKey('id_type_id')->references(reftable('identification_types'))->columns('id_type_id')->name('clients_id_type_id_fk')->table('clients')->foreignKey('nationality_id')->references(reftable('countries'))->columns('country_id')->name('clients_nationality_id_fk')->table('client_users')->foreignKey('main_client_id')->references(reftable('clients'))->columns('main_client_id')->name('client_users_main_client_id_fk')->table('client_joint_accounts')->foreignKey('id_type_id')->references(reftable('identification_types'))->columns('id_type_id')->name('client_joint_id_type_id_fk')->table('client_joint_accounts')->foreignKey('main_client_id')->references(reftable('clients'))->columns('main_client_id')->name('client_joint_main_client_id_fk')->table('cities')->foreignKey('region_id')->references(reftable('regions'))->columns('region_id')->name('cities_region_id_fk')->table('bank_branches')->foreignKey('bank_id')->references(reftable('banks'))->columns('bank_id')->name('branch_bank_id_fk')->table('api_keys')->foreignKey('user_id')->references(reftable('users'))->columns('user_id')->name('api_keys_user_id_fkey')->end();
开发者ID:codogh,项目名称:yentu,代码行数:26,代码来源:12345678901234_import.php


示例12: file_begin

function file_begin($filename)
{
    return begin(explode(".", $filename));
}
开发者ID:pawelzielak,项目名称:opencaching-pl,代码行数:4,代码来源:remotelogbook.php


示例13: mysql_error

	//Verificando que la conexion se haya hecho a la BD
	if (!$conexion_base) {
		die ('No se encuentra la base de datos seleccionada : ' . mysql_error());
	}
	
	$lNumber = $_POST['leaseNum'];
	$sDate = $_POST['sDate'];
	$eDate = $_POST['eDate'];
	$duration = $_POST['duration'];
	$studentID = $_POST['student'];
	$placeNum = $_POST['room'];
	

	$contrato = "INSERT INTO Lease VALUES ('$lNumber', '$sDate', '$eDate', '$duration', '$studentID', '$placeNum')";
	begin(); // Empieza la transaccion
	$result = mysql_query($contrato);
	
	if(!$result) {
		
		rollback(); // Si hubo un error se le da rollback
		echo 'Hubo un error';
		exit;
	}
	
	else {
		commit(); //Si fue exitosa se lleva a cabo
		echo 'Operación realizada con éxito';
	}
	
	
开发者ID:rkrdo,项目名称:university,代码行数:28,代码来源:insertar_contrato.php


示例14: do_install

function do_install()
{
    // {{{
    if (isset($_POST['database_dsn'])) {
        install_process($_POST['database_dsn']);
    } else {
        if (file_exists("auto_install.conf")) {
            install_process(trim(file_get_contents("auto_install.conf")));
            unlink("auto_install.conf");
        } else {
            begin();
        }
    }
}
开发者ID:kmcasto,项目名称:shimmie2,代码行数:14,代码来源:install.php


示例15: begin

<?php

/* 
 * The MIT License
 *
 * Copyright 2014 ekow.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
begin()->table('roles')->column('role_name')->type('string')->nulls(false)->table('users')->column('user_name')->rename('username')->end();
开发者ID:codogh,项目名称:yentu,代码行数:26,代码来源:12345678901234_noschema.php


示例16: getMicroTime

<html>
  <body>
    <?php 
$scriptName = "ViewUserInfo.php";
include "PHPprinter.php";
$startTime = getMicroTime();
$userId = $HTTP_POST_VARS['userId'];
if ($userId == null) {
    $userId = $HTTP_GET_VARS['userId'];
    if ($userId == null) {
        printError($scriptName, $startTime, "Viewing user information", "You must provide an item identifier!<br>");
        exit;
    }
}
getDatabaseLink($link);
begin($link);
$userResult = mysql_query("SELECT * FROM users WHERE users.id={$userId}", $link) or die("ERROR: Query failed");
if (mysql_num_rows($userResult) == 0) {
    commit($link);
    die("<h3>ERROR: Sorry, but this user does not exist.</h3><br>\n");
}
printHTMLheader("RUBiS: View user information");
// Get general information about the user
$userRow = mysql_fetch_array($userResult);
$firstname = $userRow["firstname"];
$lastname = $userRow["lastname"];
$nickname = $userRow["nickname"];
$email = $userRow["email"];
$creationDate = $userRow["creation_date"];
$rating = $userRow["rating"];
print "<h2>Information about " . $nickname . "<br></h2>";
开发者ID:michaelprem,项目名称:phc,代码行数:31,代码来源:ViewUserInfo.php


示例17: begin

<?php

/* 
 * The MIT License
 *
 * Copyright 2015 ekow.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
begin()->table('some_table')->rename('some_other_table')->end();
开发者ID:codogh,项目名称:yentu,代码行数:26,代码来源:12345678901235_other_table.php


示例18: queries_redirect

             // can change row on a different page without unique key
             if (!$result) {
                 break;
             }
             $affected += $connection->affected_rows;
         }
         queries_redirect(remove_from_uri(), lang('%d item(s) have been affected.', 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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