CARVIEW |
Select Language
HTTP/2 200
date: Sat, 26 Jul 2025 22:16:59 GMT
content-type: text/html; charset=utf-8
content-encoding: gzip
cf-ray: 965743b718eae9c3-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=38b39d2a-7ec3-46a3-8789-c4c7f5c02e15; expires=Sun, 26 Jul 2026 22:16:59 GMT; domain=.stackexchange.com; path=/; secure; httponly
set-cookie: prov=38b39d2a-7ec3-46a3-8789-c4c7f5c02e15; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=xEp2zIhRQsnRTODcDBtfFWSudERGx4WzIWXCo_aU50o-1753568219-1.0.1.1-1zy9MTi.w1MhWbCMk12dDZEi8yoHLeXfEu2Fj1M4kUxmDUjKk9xEk5Fge44qXXcoeMFq6u0iCZ3zCgH0xtgq7rqDExeMtEnNtI8JWB86_1A; path=/; expires=Sat, 26-Jul-25 22:46:59 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=riCcwOAVbZSE7KmezYvLWNtAuUK3n2wDEUpNNJxCHlM-1753568219727-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
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: 41af700b-243d-43f7-a98f-1b192bc71527
x-worker-origin-response-time: 979000000
x-dns-prefetch-control: off
server: cloudflare
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
492
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
- NACA report No. 400
- What part of speech is "the way?"
- Humans on alien planet get tailed by silent humanoids
- What does it mean to "cancel" a command in the linux kernel and how can one do so?
- "I met a monk and philosopher." How many people did I meet?
- Existence of Jordan curves between a compact and an open set
- Is it okay to email researchers if I’m just a high school student?
- Do TeX engines support Shavian OpenType fonts?
- How to navigate in the Universe's Heat Death
- How many simple groups are there of a given infinite cardinality?
- Regenerative cooling of rocket engine turbine's blades
- A question about as ..... as comparison
- What does this word "ahn-shdah-heh" mean?
- Can a minor run a business by having an adult act on their behalf?
- What is the meaning of 'Tel.......,qui......'
- Why is 0.0 printed as 0.00001 when rounding upward?
- In Jurassic Park, is the lysine dependency intentionally fake (in-universe)?
- How much of a really big a spaceship could a nuke take out?
- I am looking for a French mathematician who contributed to complex analysis
- Likelihood of the data in a Ornstein-Uhlenbeck-like process
- Not your ordinary affix riddle
- leftmargin in enumerate
- “Unclear step in a math book for entertainment”
- Is there any verse which says that throughout the Vedas the praise of Shiva is sung?