pdo-wrapper
                                
                                
                                
                                    pdo-wrapper copied to clipboard
                            
                            
                            
                        PDO wrapper for MySQL
I cannot use with LEFT JOIN. The SQL: $db->getPdo()->query("SELECT users.user_id, users.pw, employee.phone, employee.email FROM users LEFT JOIN employee ON users.user_id = employee.em_id WHERE employee.phone = :phone OR employee.email = :email",...
sql exapmle SELECT * FROM `Table` WHERE `id` IN (1, 2, 3) pdo example $db->rows("select * from table where id IN ?",[1,2,3]); pdo example2 $db->rows("select * from table where id...
Sql query example UPDATE users SET data=:data WHERE id=:id AND subid=:subid Pdo Wrapper Example with error $db->update('users', ['data' => 'Editor'], ['id' => $id,':subid'=>$subid]);
Line 179 - 183: ``` ` //merge data and where together $collection = array_merge($data, $where); //collect the values from collection $values = array_values($collection);` ``` Merge array $data and $where if...
Hi! Love your PDO Wrapper! I am successfully using it in a large project and it has significantly cut down on my code size. I hope you'll pardon my ignorance...
` /** * Search records with optional date range and additional parameters * * @param string $table table name * @param array|null $date_range date range array with [start_date, end_date] keys...
Hi I had to work with a JSON column, so I modified your update just to work with JSON_REPLACE. I am using locally not to touch Database.php This is the...