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


PHP create_guid_section函数代码示例

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


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

示例1: create_guid

function create_guid(){
    $microTime = microtime();
    list($a_dec, $a_sec) = explode(" ", $microTime);
    $dec_hex = dechex($a_dec* 1000000);
    $sec_hex = dechex($a_sec);
    ensure_length($dec_hex, 5);
    ensure_length($sec_hex, 6);
    $guid = "";
    $guid .= $dec_hex;
    $guid .= create_guid_section(3);
    $guid .= '-';
    $guid .= create_guid_section(4);
    $guid .= '-';
    $guid .= create_guid_section(4);
    $guid .= '-';
    $guid .= create_guid_section(4);
    $guid .= '-';
    $guid .= $sec_hex;
    $guid .= create_guid_section(6);
    return $guid;
}
开发者ID:vthuang001,项目名称:CodingField,代码行数:21,代码来源:createGUID.php

示例2: create_guid

/**
 * A temporary method of generating GUIDs of the correct format for our DB.
 * @return String contianing a GUID in the format: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
 *
 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
 * All Rights Reserved.
*/
function create_guid()
{
    global $log;
    $log->debug("Entering create_guid() method ...");
    $microTime = microtime();
    list($a_dec, $a_sec) = explode(" ", $microTime);
    $dec_hex = sprintf("%x", $a_dec * 1000000);
    $sec_hex = sprintf("%x", $a_sec);
    ensure_length($dec_hex, 5);
    ensure_length($sec_hex, 6);
    $guid = "";
    $guid .= $dec_hex;
    $guid .= create_guid_section(3);
    $guid .= '-';
    $guid .= create_guid_section(4);
    $guid .= '-';
    $guid .= create_guid_section(4);
    $guid .= '-';
    $guid .= create_guid_section(4);
    $guid .= '-';
    $guid .= $sec_hex;
    $guid .= create_guid_section(6);
    $log->debug("Exiting create_guid method ...");
    return $guid;
}
开发者ID:jgjermeni,项目名称:corebos,代码行数:32,代码来源:utils.php

示例3: getGuidSQL

 /**
  * Returns a DB specific piece of SQL which will generate GUID (UUID)
  * This string can be used in dynamic SQL to do multiple inserts with a single query.
  * I.e. generate a unique Sugar id in a sub select of an insert statement.
  * @return string
  */
 public function getGuidSQL()
 {
     $guidStart = create_guid_section(9);
     return "'{$guidStart}-' || HEX(generate_unique())";
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:11,代码来源:IBMDB2Manager.php

示例4: getGuidSQL

 /**
  * Returns a DB specific piece of SQL which will generate GUID (UUID)
  * This string can be used in dynamic SQL to do multiple inserts with a single query.
  * I.e. generate a unique Sugar id in a sub select of an insert statement.
  * @return string
  */
 public function getGuidSQL()
 {
     $guidStart = create_guid_section(3);
     return "'{$guidStart}-' || sys_guid()";
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:11,代码来源:OracleManager.php


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