fluentpdo
fluentpdo copied to clipboard
A PHP SQL query builder using PDO
The idea of 30 seems to be around since 2019 but still no branch around and nothing. I wouldn't mind to contribute to it but there is no code and...
To address #289
``` $dbh = new \PDO(sprintf("mysql:host=%s;port=%s;dbname=%s", 'localhost', 3306, 'database'), 'root', 'password'); $query = new \Envms\FluentPDO\Query($dbh); $query = $query; $query = $query ->from("articles") ->select(" *, DATE_FORMAT(cdate, '%H:%i %d.%m.%Y') AS cdate2, DATE_FORMAT(cdate, '%d.%m.%Y')...
``` $query = new \Envms\FluentPDO\Query($this->pdo); $query = $query ->from('articles AS a') ->select("a.id, a.title, a.cdate") ->where("a.s_hidden = 0") ->where("a.s_draft = 0") ->leftJoin("articles_keys AS ak ON ak.aid = a.id") ->orderBy("a.cdate DESC") ->groupBy("a.id");...
Hello, It will be great to be able run INSERT SELECT queries like: ``` $select = $fpdo->from('table1')->select(['id', 'name', 'date'], true)->where('some', 'any'); $fpdo->insertInto('table2')->values($select, ['t_id', 't_name', 't_date']) ``` And get `INSERT INTO...
I want to get two date ranges. I can't find the method in. How can I do it?
;) https://envms.github.io/fluentpdo/ 