Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(0);
- /*** ketik problem anda dibawah ini
- mengeluarkan sesuai controller
- */
- /* ketik coding PHP anda dibawah ini */
- class Db
- {
- private $dbSetup;
- private $conn;
- private $que;
- function __construct($param)
- {
- $this->dbSetup = $param;
- }
- function db()
- {
- $this->conn = new PDO($dsn, $user, $password);
- }
- function beginTransaction(){
- $this->conn->beginTransaction();
- }
- function countRegisteration($data)
- {
- $email = $data['email'];
- $que = $this->conn->prepare("select count(*) from table where email=?");
- $que->bindValue(1, $email);
- $this->que = $que;
- }
- function st()
- {
- $this->que->execute();
- }
- function fetchColumn()
- {
- return $this->que->fetchColumn();
- }
- }
- /* end of file */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement