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


PHP Mapper::__construct方法代码示例

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


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

示例1:

 function __construct($table)
 {
     $class = get_class($this);
     print_r(strToLower($class));
     echo "\n";
     parent::__construct($table);
 }
开发者ID:jonolsson,项目名称:Saturday,代码行数:7,代码来源:Articles.php

示例2: VALUES

 function __construct()
 {
     parent::__construct();
     $this->selectStmt = self::$db_handler->prepare('SELECT * FROM health_goal WHERE uid=?');
     $this->updateStmt = self::$db_handler->prepare('UPDATE health_goal SET walk=?, upper_limb=?, lower_limb=? WHERE uid=?');
     $this->insertStmt = self::$db_handler->prepare('INSERT INTO health_goal ( walk, upper_limb, lower_limb ) VALUES( ?, ?, ? )');
 }
开发者ID:570468837,项目名称:Daily-pracitce,代码行数:7,代码来源:HGMapper.php

示例3: __construct

 public function __construct()
 {
     parent::__construct();
     $this->selectStmt = self::$db_handler->prepare('SELECT * FROM setting WHERE uid=?');
     $this->updateStmt = self::$db_handler->prepare('UPDATE setting SET weight=?, heart_rate=?, slumber=?, walk=?, upper_limb=?, lower_limb=?, send_campaign=?, sync_time=? WHERE uid=?');
     $this->insertStmt = self::$db_handler->prepare('INSERT INTO setting ( uid ) VALUES( ? )');
 }
开发者ID:570468837,项目名称:Daily-pracitce,代码行数:7,代码来源:SettingMapper.php

示例4: venue

 function __construct()
 {
     parent::__construct();
     $this->selectStmt = self::$PDO->prepare("SELECT * FROM venue WHERE id=?");
     $this->updateStmt = self::$PDO->prepare("update venue set name=?, id=? where id=?");
     $this->insertStmt = self::$PDO->prepare("insert into venue ( name ) \n                             values( ? )");
 }
开发者ID:jabouzi,项目名称:projet,代码行数:7,代码来源:listing13.02.php

示例5: __construct

 /**
  * ActivityMapper constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $this->selectAll = self::$db_handler->prepare('SELECT title, content FROM activity');
     $this->selectStmt = self::$db_handler->prepare('SELECT * FROM activity WHERE acid=?');
     $this->updateStmt = self::$db_handler->prepare('UPDATE activity SET title=?, content=?, a_img_url=?, enter_amount=?, end_time=? WHERE acid=?');
     $this->insertStmt = self::$db_handler->prepare('INSERT INTO activity ( title, content, post_time, end_time ) VALUES( ?, ?, ?, ? )');
 }
开发者ID:570468837,项目名称:Daily-pracitce,代码行数:11,代码来源:ActivityMapper.php

示例6: plan

 function __construct()
 {
     parent::__construct();
     $this->selectStmt = self::$db_handler->prepare('SELECT * FROM plan WHERE uid=?');
     $this->updateStmt = self::$db_handler->prepare('UPDATE plan SET breakfast=?, lunch=?, dinner=?, exercise=? WHERE uid=? AND pid=?');
     $this->insertStmt = self::$db_handler->prepare('INSERT INTO plan ( pid, uid ) VALUES( ?, ? )');
     $this->countStmt = self::$db_handler->prepare('SELECT count(*) ' . self::COUNT . ' FROM plan WHERE uid=?');
 }
开发者ID:570468837,项目名称:Daily-pracitce,代码行数:8,代码来源:PlanMapper.php

示例7: __construct

 /**
  * PostMapper constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $this->selectAll = self::$db_handler->prepare('SELECT * FROM post ORDER BY post_id');
     $this->selectStmt = self::$db_handler->prepare('SELECT * FROM post WHERE post_id=?');
     $this->updateStmt = self::$db_handler->prepare('UPDATE post SET content=? WHERE post_id=?');
     $this->insertStmt = self::$db_handler->prepare('INSERT INTO post (content, post_time) VALUES(?, ? )');
 }
开发者ID:570468837,项目名称:Daily-pracitce,代码行数:11,代码来源:PostMapper.php

示例8: venue

 function __construct()
 {
     parent::__construct();
     $this->selectAllStmt = self::$PDO->prepare("SELECT * FROM venue");
     $this->selectStmt = self::$PDO->prepare("SELECT * FROM venue WHERE id=?");
     $this->updateStmt = self::$PDO->prepare("UPDATE venue SET name=?, id=? WHERE id=?");
     $this->insertStmt = self::$PDO->prepare("INSERT into venue ( name ) \n                             values( ? )");
 }
开发者ID:jabouzi,项目名称:projet,代码行数:8,代码来源:VenueMapper.php

示例9: __construct

 /**
  * AdviceMapper constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $this->selectUser = self::$db_handler->prepare('SELECT a.vote, a.content, q.title, q.qid
           FROM advice a JOIN question q ON a.qid = q.qid WHERE ans_user=?');
     $this->selectStmt = self::$db_handler->prepare('SELECT a.*, u.uname FROM advice a JOIN user u on a.ans_user = u.uid WHERE qid=?');
     $this->updateStmt = self::$db_handler->prepare('UPDATE advice SET content=? WHERE qid=?');
     $this->insertStmt = self::$db_handler->prepare('INSERT INTO advice ( qid, content, ans_user, time ) VALUES( ?, ?, ?, ? )');
 }
开发者ID:570468837,项目名称:Daily-pracitce,代码行数:12,代码来源:AdviceMapper.php

示例10: space

 function __construct()
 {
     parent::__construct();
     $this->selectAllStmt = self::$PDO->prepare("SELECT * FROM space");
     $this->selectStmt = self::$PDO->prepare("SELECT * FROM space WHERE id=?");
     $this->updateStmt = self::$PDO->prepare("UPDATE space SET name=?, id=? WHERE id=?");
     $this->insertStmt = self::$PDO->prepare("INSERT into space ( name, venue ) \n                             values( ?, ?)");
     $this->findByVenueStmt = self::$PDO->prepare("SELECT * FROM space where venue=?");
 }
开发者ID:jabouzi,项目名称:projet,代码行数:9,代码来源:SpaceMapper.php

示例11: usergroups

 function __construct(PDO $pdo)
 {
     parent::__construct($pdo);
     $this->selectStmt = $this->PDO->prepare("SELECT * FROM usergroups WHERE id=?");
     $this->selectAllStmt = $this->PDO->prepare("SELECT id, title FROM usergroups");
     $this->insertStmt = $this->PDO->prepare("INSERT INTO usergroups (title, color) VALUES (?,?)");
     $this->updateStmt = $this->PDO->prepare("UPDATE usergroups SET title=?, color=? WHERE id=?");
     $this->deleteStmt = $this->PDO->prepare("DELETE FROM usergroups WHERE id=?");
 }
开发者ID:Klym,项目名称:flame,代码行数:9,代码来源:UserGroupMapper.class.php

示例12: event

 function __construct()
 {
     parent::__construct();
     $this->selectAllStmt = self::$PDO->prepare("SELECT * FROM event");
     $this->selectBySpaceStmt = self::$PDO->prepare("SELECT * FROM event where space=?");
     $this->selectStmt = self::$PDO->prepare("SELECT * FROM event WHERE id=?");
     $this->updateStmt = self::$PDO->prepare("UPDATE event SET start=?, duration=?, name=?, id=? WHERE id=?");
     $this->insertStmt = self::$PDO->prepare("INSERT into event (start, duration, space, name) \n                             values( ?, ?, ?, ?)");
 }
开发者ID:jabouzi,项目名称:projet,代码行数:9,代码来源:EventMapper.php

示例13: __construct

 /**
  * QuestionMapper constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $this->selectUser = self::$db_handler->prepare('SELECT title, content, vote, qid FROM question WHERE uid=?');
     $this->selectStmt = self::$db_handler->prepare('SELECT u.uname, q.type, q.to_user, q.title, q.content, q.time, q.vote
         FROM question q JOIN user u ON q.uid = u.uid WHERE qid=?');
     $this->updateStmt = self::$db_handler->prepare('UPDATE question SET title=?, content=?, vote=? WHERE qid=?');
     $this->insertStmt = self::$db_handler->prepare('INSERT INTO question ( uid, type, to_user, title, content, time) VALUES( ?, ?, ?, ?, ?, ? )');
     $this->selectAll = self::$db_handler->prepare('SELECT * FROM question');
 }
开发者ID:570468837,项目名称:Daily-pracitce,代码行数:13,代码来源:QuestionMapper.php

示例14:

 function __construct()
 {
     parent::__construct();
     global $url;
     $this->id = $url->getIdFirstPart();
     if (func_num_args() == 1 && is_object(func_get_arg(0))) {
         $object_ = func_get_arg(0);
         $this->foreignTable = $object_;
     }
 }
开发者ID:noxa02,项目名称:REST_ANNONCE,代码行数:10,代码来源:MessageMapper.class.php

示例15: COUNT

 function __construct($pdo)
 {
     parent::__construct($pdo);
     $this->selectCount = $this->PDO->prepare("SELECT COUNT(id) AS count FROM news");
     $this->selectStmt = $this->PDO->prepare("SELECT * FROM news WHERE id=?");
     $this->selectCollectionStmt = $this->PDO->prepare("SELECT id, title, date, type FROM news ORDER BY date DESC LIMIT ?, ?");
     $this->selectAllStmt = $this->PDO->prepare("SELECT * FROM news");
     $this->insertStmt = $this->PDO->prepare("INSERT INTO news (title, text, full_text, date, author, view, type) VALUES (?,?,?,?,?,?,?)");
     $this->updateStmt = $this->PDO->prepare("UPDATE news SET title=?, text=?, full_text=?, date=?, author=?, view=?, type=? WHERE id=?");
     $this->deleteStmt = $this->PDO->prepare("DELETE FROM news WHERE id=?");
 }
开发者ID:Klym,项目名称:flame,代码行数:11,代码来源:NewsMapper.class.php


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