Linked Questions

8 votes
6 answers
27k views

OOP PDO Database Connection

I'm currently learning about PDO, and trying to connect to the database and CRUD in OOP way, this is a simple code that I use. index.php ...
Xtrader's user avatar
  • 91
6 votes
2 answers
33k views

Inserting multiple rows in MySQL

I am building a store. When a user decides to make a purchase I need to store it in the database, but since the purchase might be of more than 1 item I'm wondering which way is the best to insert ...
php_nub_qq's user avatar
4 votes
2 answers
23k views

Simple PDO database class in PHP

I'm writing a simple database class so I could use it in my future projects. It is based on some Codeigniter database methods, but my implementation, so if you could review this, that would be cool. ...
ivke11080's user avatar
3 votes
2 answers
4k views

Simple Database Abstraction Layer

I'm learning PHP and currently object-oriented programming. I would like to get a feedback; how I'm doing so far. If I have bad coding that should be fixed immediately etc. I'd call this code an ...
Joey's user avatar
  • 45
6 votes
2 answers
2k views

Minimalistic mysql db class

I am really just looking to make sure I am not making any weird mistakes that could hurt me in the long run or if something seems odd in the way I imagine it to work. This code does work for the way I ...
sin0cide's user avatar
3 votes
2 answers
3k views

Small PHP DAO app

I'm creating a small app and decided to write my own DAO for learning, etc. At the moment it's in one big file, which I really don't like. Could you give me some tips on how: you would separate this ...
Tom Burman's user avatar
5 votes
1 answer
4k views

PDO Insert function using PHP

This code inserts data into the database successfully. I was concerned about whether it is a considered good practise to go about inserting data into the database in this way. Is there something I am ...
cwiggo's user avatar
  • 153
1 vote
2 answers
4k views

PHP PDO Wrapper

Here's a PHP PDO wrapper class that I wrote, along with example usage. This class features 2 primary methods for interacting with a database: Query(), which returns ...
reformed's user avatar
  • 111
3 votes
1 answer
5k views

PDO class for multiple databases

I have a PDO class below: ...
XTRUST.ORG's user avatar
2 votes
2 answers
725 views

PHP PDO Helper Functions

Just recently I've wanted to update the PHP scripts I use to fetch information from a database for an iOS application. I've got around to it today, and I had a few questions that'd I like a second ...
Jeffrey's user avatar
  • 249
3 votes
2 answers
3k views

PDO class extend

I am moving in to OOP PHP and having some problems extending my database class to my objects. I am still new to the variable scoping in OOP PHP, so if it a tiny syntax error I apologize. If my ...
miasyntax's user avatar
3 votes
3 answers
2k views

A PDO connection classto initiate multiple connection and easy access

I've been looking for a way to make the database connection easy available directry from any script, and from inside other classes. And since I tend to have different connections based on what action ...
ThomasK's user avatar
  • 337
4 votes
1 answer
2k views

Extendable PDO Wrapper Class

I've created a PDO wrapper. I understand PDO could be used on it's own, and I'm reinventing the wheel as there are solutions like Laravel's Eloquent that would do a better job. I'd like advice on ...
Alex Garrett's user avatar
1 vote
1 answer
4k views

Doing $_POST the right way

I am not sure if I am correctly handling $_POST data in MVC pattern: Dummy $_POST data ...
Run's user avatar
  • 173
4 votes
2 answers
1k views

Restaurant system with JavaScript connecting to PHP

I'm making a web application for a restaurant kind of type. The idea is to administrate the orders and customers with the functions such as: Make a new order Delete a order View all the orders Make ...
Bas's user avatar
  • 699

15 30 50 per page