Created
February 23, 2019 11:26
-
-
Save tristanlins/2cdc6de5f895085aa35f6e4f2e950a81 to your computer and use it in GitHub Desktop.
Programmierstil / Der gesittete Programmierer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class UserDao { | |
| public function findByLoginFromRequest(Request $req) | |
| { | |
| $login = $req->request->get('login'); | |
| $statement = $this->db->prepare('SELECT user FROM users WHERE login=?'); | |
| $statement->bindValue(1, $login); | |
| return $statement->execute() ? $statement->fetch(\PDO::FETCH_ASSOC) : false; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment