Last active
August 29, 2015 14:04
-
-
Save t-cyrill/7b1eda71c9916a1ed82b to your computer and use it in GitHub Desktop.
FluentPDO example
This file contains 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 | |
$db = new PDO("sqlite:test.db") | |
$fpdo = new FluentPDO($db); | |
$fpdo->from('hogehoge_table') | |
->where(['id >= ?' => $id]) | |
->select(null) | |
->select('column, value'); | |
// SELECT column, value FROM hogehoge_table WHERE id >= ?; | |
$data = $fpdo->fetchAll(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment