Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function bind($param, $value, $type = null)
- {
- if (is_null($type)) {
- switch (true) {
- case is_int($value):
- $type = PDO::PARAM_INT;
- break;
- case is_bool($value):
- $type = PDO::PARAM_BOOL;
- break;
- case is_null($value):
- $type = PDO::PARAM_NULL;
- break;
- default:
- $type = PDO::PARAM_STR;
- }
- }
- $this->stmt->bindValue($param, $value, $type);
- }
- `$this->bind(":id","1","is_int");`
- //output = $this->stmt->bindValue(:id,1,is_int);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement