Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
3 votes
1 answer
2k views

Class method to insert a record into MySQL

I'm just starting out using OOP; classes and methods etc. I've been looking around for some PDO classes/wrappers out there, but there's not much to choose from. So I've tried to make my own. Started ...
FredoSk's user avatar
  • 33
2 votes
2 answers
88 views

Database fetch class

The active column in the database only contains a boolean. The country column contains ISO 3166 A2 codes (2 char). Do you have any advice on improving this class? ...
jackherer's user avatar
3 votes
1 answer
2k views

PDO wrapper class for database

I have my PDO Wrapper class and would love to get some more tips/opinions about what you think. This is my first class and I basically put my time into making it as logical and standardized as ...
Mike M.'s user avatar
  • 161
2 votes
1 answer
43 views

Could this connection and query class be improved?

Wrote this class it allows me to connect to database and display as many columns as I wish to. I can just give it desired parameters and I'm done. I've commented about the parameters that need it to ...
sami7913's user avatar
5 votes
1 answer
879 views

My simple PDO wrapper class

I made a simple database class and I wanted to know if there are any improvements I could work on as far as readability, efficiency, methods and making it modular goes. Any other suggestions are also ...
Kid Diamond's user avatar
  • 2,591
4 votes
1 answer
181 views

advantage of using __call method

I have wrote simple class that allowing database selection and inserts.Could you please tell me does this a right way to use __call method with any useful advantage of it ? ...
underscore's user avatar
3 votes
1 answer
203 views

Is this a complete PDO prepared class?

Is this class perfect for databases? All I want to know is what I should change to make it perfect. ...
GAURAV MAHALE's user avatar
7 votes
2 answers
188 views

Specific PHP Data Access Class

As part of a fun project to help build my knowledge of PHP. I've written a Data Access Class here to bridge the site to the database. I know there are a lot of posts and articles out there explaining ...
Alex L's user avatar
  • 5,737
4 votes
2 answers
4k views

Handling access to database connection both inside and outside of classes

Is this an OK way to handle access to database connection both inside and outside of classes? I used to include a PHP file -- database.detl.php -- at the very top of my index.php file containing the ...
ThomasK's user avatar
  • 347
1 vote
2 answers
1k views

Critique Requested on PHP Pagination Class

I did most of my PHP coding back with PHP 4, and among the projects I did was a popular pagination class. I've been meaning to bring it up to date with PHP 5 and OOP practices. I've also been working ...
j08691's user avatar
  • 111
2 votes
1 answer
433 views

User system using PDO

I'm making a very basic user system, and this is what I have so far: ...
Tom's user avatar
  • 121
3 votes
1 answer
99 views

How do I refactor this basic form handler

I've dabbled with PHP for a couple of years, I can generally get what I need done and I've been teaching myself PDO. The problem is I want to set it up with classes but i'm not really sure how to. ...
user1284386's user avatar
2 votes
2 answers
425 views

PDO database class review

I've taken this class and made it my own but I'm curious to know what other think of it? Are there things I'm missing? Anything you can recommend? ...
SeanWM's user avatar
  • 131
7 votes
1 answer
7k views

PHP Extending PDO Class

I am trying to convert myself from using mysql extension to using PDO, with that being said I was curious if I am going about this the right way. I have a custom logging system that I built I am ...
McGee.WIll's user avatar
1 vote
2 answers
958 views

PHP PDO Custom class ple

i created a database class from a good tutorial and wanted to put it up here so it would get in some search results. it took me about 2 days to find it. also i added a few custom functions to it.. ...
Trae Moore's user avatar