Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@t-cyrill
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save t-cyrill/7b1eda71c9916a1ed82b to your computer and use it in GitHub Desktop.
Save t-cyrill/7b1eda71c9916a1ed82b to your computer and use it in GitHub Desktop.
FluentPDO example
<?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