CARVIEW |
Select Language
HTTP/2 200
date: Sat, 26 Jul 2025 09:27:13 GMT
content-type: text/html; charset=utf-8
cf-ray: 9652dc242beac1d2-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=9726c2cf-39a0-46d7-8886-1ddf772498fd; expires=Sun, 26 Jul 2026 09:27:13 GMT; domain=.stackexchange.com; path=/; secure; httponly
strict-transport-security: max-age=31536000; includeSubDomains
vary: Accept-Encoding
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
x-clacks-overhead: GNU Terry Pratchett
x-frame-options: SAMEORIGIN
x-request-guid: a9f04417-440d-475b-b68a-1a1b91eedb71
x-worker-origin-response-time: 533000000
x-dns-prefetch-control: off
set-cookie: prov=9726c2cf-39a0-46d7-8886-1ddf772498fd; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=xz1m1AiVBtaRFLbb7wgdb6hPpHaR3AMg5_96QDztxyg-1753522033-1.0.1.1-r3HhRD7otnmeXEO73HE3A82JCNLogzGwDKgvh_hspQ24bg5vahi21WzEGXFH3UgMtg_PHjPQVBjaD_BfvcZjz75ox4WEinymYvPigRCDtMo; path=/; expires=Sat, 26-Jul-25 09:57:13 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=drRiSV7G8KgOAVJ7fRdCyCLpCljRvYnYKKfd.zdvyCg-1753522033862-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
server: cloudflare
content-encoding: gzip
Newest 'pdo' Questions - Code Review Stack Exchange
Skip to main content
Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack ExchangeTeams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about TeamsQuestions tagged [pdo]
PDO is a PHP extension that serves as a data access abstraction layer for accessing databases.
334 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
6
votes
3
answers
491
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 ...
8
votes
3
answers
1k
views
A simple PHP login form with PDO
I wrote a simple PHP login form for a website. It has an initialization script, as well as a form to allow a user to login, plus a link to log the user out after logging in.
...
2
votes
1
answer
143
views
0
votes
1
answer
263
views
2
votes
2
answers
276
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 ...
0
votes
1
answer
273
views
Can I use PDO transaction in this way? [closed]
So I want to use PDO transaction in PHP OOP where in the class are multiple insert/update queries.
If I create a new methods in Class like beginTransaction(), commit(), rollback() and I use them ...
1
vote
1
answer
397
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 ...
1
vote
1
answer
288
views
Is this PDO query okay to use in PHP OOP?
Do you think this code is good if I want to do a simple SQL query? Is it safe to use? Or am I doing something wrong?
...
5
votes
3
answers
294
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 ...
3
votes
1
answer
249
views
Proper PDO connection function
I am reviewing the database class for a live website. I am not sure if the current connect function is the best way to create a pdo object as it appears to create a new connection every time it is ...
1
vote
1
answer
86
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 ...
1
vote
1
answer
104
views
7
votes
2
answers
247
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 ...
3
votes
1
answer
136
views
Pagination helper class
The most nauseous problem with pagination is the fact that you have to write two almost identical queries. For the various reasons I am not inclined to use the SQL-only way (such as ...
4
votes
2
answers
216
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:
...
- The Overflow Blog
-
-
- Featured on Meta
-
-
Related Tags
php × 327
mysql × 154
object-oriented × 62
security × 36
sql × 34
authentication × 23
database × 22
php5 × 20
sql-injection × 19
beginner × 17
classes × 15
session × 12
mysqli × 10
html × 9
performance × 8
mvc × 8
jquery × 7
ajax × 7
javascript × 5
form × 5
error-handling × 5
image × 5
pagination × 5
wrapper × 5
optimization × 4
more related tags
Hot Network Questions
- In Jurassic Park, is the lysine dependency intentionally fake (in-universe)?
- Heretofore I think I have been using 'heretofore' incorrectly
- Tracking stored procedure performance metrics
- Is it okay to email researchers if I’m just a high school student?
- In Fantastic Four 2025 shouldn't this thing have taken years?
- When did the OEIS get even better?
- Can one engage with physics (or science) without touching philosophy?
- Write two very different programs with the same characters
- How do I set up a recursive algorithm to repeatedly square root a positive real number?
- How to navigate in the Universe's Heat Death
- Are classified documents subject to a subpoena in discovery?
- Will an error in two of my published papers affect my PhD thesis evaluation?
- Did the first sin in the garden of Eden actually take place before the fruit was eaten?
- What Isp can be gotten from a napthalene (mothball) hot gas thruster? Did it work in space?
- Vector Bundle and the fiber-preserving condition
- Mars colony book I read in the 80's. The name?
- Which workflow is more effective: worldbuilding before plotting or the other way around?
- spots / stains on tubeless tire
- Can you yaw an airplane by only using differential thrust?
- Where did the name of Windows XP come from? Was it connected to the Cairo project?
- Break long equation: vertical alignment of indentation
- Is the surface of Mars or the Moon mostly (or relatively) homogeneous, unlike the Earth?
- Are you required to protect trade secrets revealed to you even if you didn't sign an NDA?
- How to extend an MDF shelf?