All Questions
Tagged with object-orientedmysql
64 questions
57votes
2answers
60kviews
Class for reducing development time
There are many PHP PDO classes out there, agreed. However I find they do not allow for flexibility. So I created one that helps reduce development time as little as it may be but it does the job (...
11votes
2answers
759views
Object Paradigm for PHP, Practice in Design
I've created and I manage a point of sale web application built in PHP which has thus far followed no clear guidelines or methodology for development; it's operation is completely procedural. In turn, ...
9votes
2answers
2kviews
User registration and login
I am doubtful about the security of my PHP code. I am new to programming, but want to learn how to secure things, protect my databases from SQL injection, and other best practices. I'd like to know if ...
9votes
2answers
4kviews
MySQL class to add user/database
I'm creating tool to add new virtualhost on UNIX-box. One of tasks is to add a new user and database to MariaDB (aka MySQL) server. In fact - this my first 'real' attempt to use OOP. Here is class, ...
9votes
1answer
450views
Database method to query
I have a database class that in __construct() initialize a PDO connection and insert the instance into a $db private var. Now i'm working on a method that can be ...
8votes
1answer
222views
A PHP API which has an endpoint for processing a user's facebook login details
I'm working on a PHP API for my angular JS Phonegap application. At the moment I'm focusing on working with a user's facebook public profile data. I'll explain the process a little first: The user ...
8votes
1answer
5kviews
How is OOP achieved with configuration files in PHP?
Someone asked if their singleton is good for OOP: Using a singleton class to get and set program wide settings. However, the answer just provides tweaks to his existing code - but the question wasn'...
7votes
2answers
229views
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 ...
6votes
2answers
655views
DB abstraction, private methods in OOP PHP library
This library registers a new user. Questions: Where should the DB class instantiation happen for user class? I tried instantiation in the constructor but that property doesn't seem to be available ...
6votes
2answers
234views
Database layer class
I'm trying to get familiar with database handling. Can you point out my errors and what I should change? I want to learn new methods, but just don't want to learn it the wrong way. I do realize ...
6votes
2answers
176views
A class to add and select players within a database
I have a question and want to know if my class is considered object oriented. ...
6votes
1answer
1kviews
PHP class architecture and dependency injection
Let me start off by saying I am not new to PHP or PDO, but very new to OO PHP, and have been struggling to get a firm idea of best practices in my head regarding dependency injection and structuring ...
5votes
3answers
99views
Performing database interactions
I wrote this CRUD class in PHP that has methods to do database interactions, but I want to know if it is good/secure/elegant? It works fine and all and it hasn't ever given me any troubles, but I'm ...
5votes
2answers
9kviews
PHP MySQL PDO Database Class
Please let me know if any improvements could be made to my PHP PDO MySQL Class. ...
5votes
1answer
204views
Automatic database migration system
Github here: https://github.com/cmancone/mygrations I'm working on a different kind of database migration system for helping manage web applications. I asked a question about part of the system just ...