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

PHP DatabaseHandler类代码示例

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

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



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

示例1: importDataFromDumpFile

function importDataFromDumpFile($sid, DatabaseHandler $dbHandler, $userId, $filePath, $my_pligg_base_no_slash)
{
    $ktrExeDao = new KTRExecutorDAO();
    $tableNames = $dbHandler->loadTables();
    $logIds = array();
    foreach ($tableNames as $tableName) {
        $logIds[$tableName] = $ktrExeDao->addExecutionInfoTuple($sid, $tableName, $userId);
    }
    try {
        $dbImporter = DatabaseImporterFactory::createDatabaseImporter($dbHandler->getDriver(), $sid, $my_pligg_base_no_slash);
        $dbImporter->importDbData($filePath);
        foreach ($logIds as $logId) {
            $ktrExeDao->updateExecutionInfoStatus($logId, 'success');
        }
    } catch (Exception $e) {
        foreach ($logIds as $logId) {
            $ktrExeDao->updateExecutionInfoStatus($logId, 'error');
            $ktrExeDao->updateExecutionInfoErrorMessage($logId, $e->getMessage());
        }
    }
    $queryEngine = new QueryEngine();
    foreach ($logIds as $tableName => $logId) {
        $numProcessed = $queryEngine->GetTotalNumberTuplesInTableBySidAndNameFromExternalDB($sid, $tableName);
        $ktrExeDao->updateExecutionInfoTupleAfterPanTerminated($logId, 0, '', $numProcessed, 'success');
    }
}
开发者ID:Grprashanthkumar,项目名称:ColfusionWeb,代码行数:26,代码来源:import_dump_parallel.php


示例2: __construct

 /**
  * Konstruktor.
  */
 function __construct()
 {
     include_once FRAME_PATH . 'DatabaseHandler.php';
     $dbHandler = new DatabaseHandler('matyas01_cloudsDB', 'matyas01_mkvadmn', 'nrgbbksv');
     $this->db = $dbHandler->getDBO();
     $this->processing();
 }
开发者ID:majtenyim,项目名称:thesis-webserver,代码行数:10,代码来源:Base.php


示例3: updateTag

 public function updateTag($tag_id, $name)
 {
     $params[] = $name;
     $params[] = $post_id;
     $sql = "UPDATE {$this->tags} SET name = ? WHERE post_id = ?";
     DatabaseHandler::Execute($sql, $params);
 }
开发者ID:khoteevnd,项目名称:mb,代码行数:7,代码来源:Model_Tag_class.php


示例4: educations_Insert

 public static function educations_Insert($user_id, $education_level, $education_average, $education_university, $education_branch, $education_sub_branch, $from_date, $to_date, $now, $activities, $attach_file)
 {
     $sql = 'CALL `sp_educations_Insert`(:user_id, :education_level, :education_average, :education_university, :education_branch, :education_sub_branch, :from_date, :to_date, :now, :activities, :attach_file)';
     $params = array(':user_id' => $user_id, ':education_level' => $education_level, ':education_average' => $education_average, ':education_university' => $education_university, ':education_branch' => $education_branch, ':education_sub_branch' => $education_sub_branch, ':from_date' => $from_date, ':to_date' => $to_date, ':now' => $now, ':activities' => $activities, ':attach_file' => $attach_file);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
开发者ID:pooya-alen1990,项目名称:sampleTalent,代码行数:7,代码来源:EDUCATIONS.php


示例5: GetDepartments

 public static function GetDepartments()
 {
     // Составляем SQL-запрос
     $sql = 'CALL catalog_get_departments_list()';
     // Выполняем запрос и получаем результаты
     return DatabaseHandler::GetAll($sql);
 }
开发者ID:kulikovalexey,项目名称:myshop,代码行数:7,代码来源:catalog.php


示例6: blog_subject_Insert

 public static function blog_subject_Insert($subject_name)
 {
     $sql = 'CALL `sp_blog_subject_Insert`(:subject_name)';
     $params = array(':subject_name' => $subject_name);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
开发者ID:pooya-alen1990,项目名称:sampleTalent,代码行数:7,代码来源:BLOG_SUBJECT.php


示例7: admins_Insert

 public static function admins_Insert($first_name, $last_name, $password, $mobile, $about, $roles_id)
 {
     $sql = 'CALL `sp_admins_Insert`(:first_name, :last_name, :password, :mobile, :about, :roles_id)';
     $params = array(':first_name' => $first_name, ':last_name' => $last_name, ':password' => $password, ':mobile' => $mobile, ':about' => $about, ':roles_id' => $roles_id);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
开发者ID:pooya-alen1990,项目名称:sampleTalent,代码行数:7,代码来源:ADMINS.php


示例8: roles_Insert

 public static function roles_Insert($title)
 {
     $sql = 'CALL `sp_roles_Insert`(:title)';
     $params = array(':title' => $title);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
开发者ID:pooya-alen1990,项目名称:sampleTalent,代码行数:7,代码来源:ROLES.php


示例9: blog_keywords_Insert

 public static function blog_keywords_Insert($blog_id, $keyword)
 {
     $sql = 'CALL `sp_blog_keywords_Insert`(:blog_id, :keyword)';
     $params = array(':blog_id' => $blog_id, ':keyword' => $keyword);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
开发者ID:pooya-alen1990,项目名称:sampleTalent,代码行数:7,代码来源:BLOG_KEYWORDS.php


示例10: favorite_user_Insert

 public static function favorite_user_Insert($favorite_blog, $user_id)
 {
     $sql = 'CALL `sp_favorite_user_Insert`(:favorite_blog, :user_id)';
     $params = array(':favorite_blog' => $favorite_blog, ':user_id' => $user_id);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
开发者ID:pooya-alen1990,项目名称:sampleTalent,代码行数:7,代码来源:FAVORITE_USER.php


示例11: getTeacherByid

function getTeacherByid($teacherid)
{
    $sql = "SELECT * FROM teacher WHERE ID = :teacherid";
    $params = array(':teacherid' => $teacherid);
    $result = DatabaseHandler::GetAll($sql, $params);
    return $result[0]['Name'];
}
开发者ID:RonishKalia,项目名称:Feedback-Portal,代码行数:7,代码来源:functions.php


示例12: connect

 public function connect()
 {
     $dbh = DatabaseHandler::getInstance();
     $dbh->filePath = __DIR__ . '/squid_database.sqlite';
     $dbh->openDBMS('sqlite');
     return $dbh;
 }
开发者ID:argosback,项目名称:statistical-log-analizer,代码行数:7,代码来源:SquidDatabase.php


示例13: users_Insert

 public static function users_Insert($first_name, $last_name, $password, $job_title, $gender, $marriage_state, $profile_pic, $cover_pic, $birthday, $mobile, $tel, $address, $email, $website, $job_state, $job_kind, $salary, $city_id, $about_me, $register_date)
 {
     $sql = 'CALL `sp_users_Insert`(:first_name, :last_name, :password, :job_title, :gender, :marriage_state, :profile_pic, :cover_pic, :birthday, :mobile, :tel, :address, :email, :website, :job_state, :job_kind, :salary, :city_id, :about_me, :register_date)';
     $params = array(':first_name' => $first_name, ':last_name' => $last_name, ':password' => $password, ':job_title' => $job_title, ':gender' => $gender, ':marriage_state' => $marriage_state, ':profile_pic' => $profile_pic, ':cover_pic' => $cover_pic, ':birthday' => $birthday, ':mobile' => $mobile, ':tel' => $tel, ':address' => $address, ':email' => $email, ':website' => $website, ':job_state' => $job_state, ':job_kind' => $job_kind, ':salary' => $salary, ':city_id' => $city_id, ':about_me' => $about_me, ':register_date' => $register_date);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
开发者ID:pooya-alen1990,项目名称:sampleTalent,代码行数:7,代码来源:USERS.php


示例14: comments_Insert

 public static function comments_Insert($full_name, $mail, $text, $add_time, $activate, $ip, $user_id, $admin_id, $blog_id, $comment_id)
 {
     $sql = 'CALL `sp_comments_Insert`(:full_name, :mail, :text, :add_time, :activate, :ip, :user_id, :admin_id, :blog_id, :comment_id)';
     $params = array(':full_name' => $full_name, ':mail' => $mail, ':text' => $text, ':add_time' => $add_time, ':activate' => $activate, ':ip' => $ip, ':user_id' => $user_id, ':admin_id' => $admin_id, ':blog_id' => $blog_id, ':comment_id' => $comment_id);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
开发者ID:pooya-alen1990,项目名称:sampleTalent,代码行数:7,代码来源:COMMENTS.php


示例15: quotations_Insert

 public static function quotations_Insert($author, $text)
 {
     $sql = 'CALL `sp_quotations_Insert`(:author, :text)';
     $params = array(':author' => $author, ':text' => $text);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
开发者ID:pooya-alen1990,项目名称:sampleTalent,代码行数:7,代码来源:QUOTATIONS.php


示例16: permissions_Insert

 public static function permissions_Insert($title, $ENtitle)
 {
     $sql = 'CALL `sp_permissions_Insert`(:title, :ENtitle)';
     $params = array(':title' => $title, ':ENtitle' => $ENtitle);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
开发者ID:pooya-alen1990,项目名称:sampleTalent,代码行数:7,代码来源:PERMISSIONS.php


示例17: b_a_Insert

 public static function b_a_Insert($blog_id, $audience_id)
 {
     $sql = 'CALL `sp_b_a_Insert`(:blog_id, :audience_id)';
     $params = array(':blog_id' => $blog_id, ':audience_id' => $audience_id);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
开发者ID:pooya-alen1990,项目名称:sampleTalent,代码行数:7,代码来源:B_A.php


示例18: rolespermissions_Insert

 public static function rolespermissions_Insert($roles_id, $permissions_id)
 {
     $sql = 'CALL `sp_rolespermissions_Insert`(:roles_id, :permissions_id)';
     $params = array(':roles_id' => $roles_id, ':permissions_id' => $permissions_id);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
开发者ID:pooya-alen1990,项目名称:sampleTalent,代码行数:7,代码来源:ROLESPERMISSIONS.php


示例19: blog_audience_Insert

 public static function blog_audience_Insert($audience_name)
 {
     $sql = 'CALL `sp_blog_audience_Insert`(:audience_name)';
     $params = array(':audience_name' => $audience_name);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
开发者ID:pooya-alen1990,项目名称:sampleTalent,代码行数:7,代码来源:BLOG_AUDIENCE.php


示例20: authors_Insert

 public static function authors_Insert($full_name)
 {
     $sql = 'CALL `sp_authors_Insert`(:full_name)';
     $params = array(':full_name' => $full_name);
     DatabaseHandler::Close();
     return DatabaseHandler::Execute($sql, $params);
 }
开发者ID:pooya-alen1990,项目名称:sampleTalent,代码行数:7,代码来源:AUTHORS.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP DatabaseManager类代码示例发布时间:2022-05-23
下一篇:
PHP DatabaseFactory类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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