Questions tagged [pdo]
PDO is a PHP extension that serves as a data access abstraction layer for accessing databases.
334 questions
6 votes
3 answers
550 views
PHP PDO wrapper class with security
I have created following php PDO wrapper class with the help of google and other some websites and my little knowledge. I will use this for less coding work without change whole previous coded ...
2 votes
1 answer
168 views
PHP Validation script
The code below is modified slightly from the code in this previous post. I believe the code below could be improved and more secured but i don't know how so someone please show me how an improved ...
2 votes
2 answers
305 views
Best Practices for PHP PDO Pagination with Search Functionality
I'm working on implementing a pagination system with search functionality using PHP and PDO. The code I've written seems to work, but I want to ensure that I'm following best practices and avoiding ...
1 vote
1 answer
424 views
Wrap INSERT statements to PDO transaction (PHP OOP)
so Im trying to wrap SQL INSERT statements to PDO transaction in PHP OOP. I don't know if I'm doing it right and this is the best/easiest way to do it. So what is important for me is: There can be ...
5 votes
3 answers
324 views
DB Class extending PDO w/ other useful functions
I have this DB class that extends PDO, that also has useful functions for certain tasks; I was wondering how well it's coded, and if so, what I could maybe improve on. I tried commenting in ...
1 vote
1 answer
109 views
Updating multiple database tables when products are shipped back by customer
So, in this example I have to make these changes in my tables: Select Product Data => SKU, QTY Insert into shipping_back table Update in shipping_back to current date Update in customers to ...
7 votes
2 answers
287 views
Connect to MYSQL database in PHP with prepared statements
I have recently learned about using the functions exposed by the PDO extension. I created a db class which can handle common actions like create, update, delete and select. Is this method a correct ...
4 votes
2 answers
235 views
Using a transaction to create account records
This is my first time using commit and rollback. I just need to know if this is a proper execution of the functions for this particular situation: ...