2
votes
0answers
99 views

Designing a universal database driver class

I have a homebrew MVC framework that I have been using for a while, and it has been working great, but I am planning an upgrade to it for its ORM classes. So far, it only supports SQL databases by ...
1
vote
1answer
147 views

Which practice is the best for database connection? (PHP, etc)

Leave a open database connection throughout the execution of the aplication, or for each time a operation will be executed a new connection will be created? Open throughout the execution: Open ...
1
vote
3answers
145 views

Single-Tenant Databases - creating and updating new tenants via PHP

We've built a single-tenant webapp in PHP and as it stands each hosted 'site' has its own database. However we need to be able to run a script to create their database, assign a mysql user, and ...
2
votes
1answer
204 views

DB Schema for packaging products / services together under a single pric / Offer

I'm trying to 'conceive' the business logic of this website that have many activities, that the users can build their "combo" and get discounts depending on their choices and how long they are willing ...
8
votes
4answers
356 views

Should database queries be abstracted out of the page itself?

When writing page generation in PHP, I often find myself writing a set of files littered with database queries. For example, I might have a query to fetch some data about a post directly from the ...
4
votes
8answers
292 views

How can I give my client “full access” to their PHP application's MySQL database?

I am building a PHP application for a client and I'm seriously considering WordPress or a simple framework that will allow me to quickly build out features like forums, etc. However, the client is ...
2
votes
1answer
89 views

One codebase - lots of hosted services (similar to a basecamp style service) - planning structure

We have built a service (PHP Based) for a client, and are now looking to offer it to other clients as a hosted service. For this example, think of it like a hosted forum service, where a client signs ...
3
votes
3answers
684 views

How to handle monetary values in PHP and MySql?

I've inherited a huge pile of legacy code written in PHP on top of a MySQL database. The thing I noticed is that the application uses doubles for storage and manipulation of data. Now I came across ...
3
votes
2answers
574 views

DB Object passing between classes singleton, static or other?

So I'm designing a reporting system at work it's my first project written OOP and I'm stuck on the design choice for the DB class. Obviously I only want to create one instance of the DB class ...
0
votes
4answers
721 views

PHP - Data Access Layer

I am currently reviewing a code base and noticed that a majority of the calls (along with DB connections) are just buried inside the PHP scripts. I would have assumed that like other languages they ...
1
vote
3answers
165 views

Help with DB Structure, vOD site

I have a video on demand style site that hosts series of videos under different modules. However with the way I have designed the database it is proving to be very slow. I have asked this question ...
0
votes
2answers
120 views

How should I handle using two databases with a legacy PHP application?

I have a legacy PHP application that was written in 2004 and uses MSSQL as a database backend. At this stage MSSQL is still supported by PHP but only just via a Microsoft driver. I have looked at ...
3
votes
1answer
208 views

Technique for multiple users on same datasets

This is more a learning question than coding, but I'm certain it's a common issue for anyone developing administration systems or applications in php/mysql/js etc. I've developed quite a complex ...
3
votes
1answer
627 views

How can I integrate and store sessions in my database, as opposed to storing them in a cookie and file system?

I've never worked with sessions in a database before, and I'm a little unclear on how they work. I have a user class already designed which stores user information: username, password, email etc. I ...
6
votes
2answers
298 views

How should I organize the words of a sentence for better outputs/maintenance and performance?

Having this sentence (consider many sentences in the future) David Henderson Houston patented the first roll film for cameras in 1881. I can make questions like 1. Who patented the roll film? ...
4
votes
4answers
601 views

When is it necessary to use ORM tools?

I was raised in a part of web developmentland where the creation of websites is mostly synonymous with Wordpress, FTP, Joomla, and procedural code, instead of things like TDD, A/B testing, Doctrine, ...
5
votes
3answers
605 views

what are the best tips for storing images in a database?

Is it appropriate to store the image files in the database? Or it would be better to store only the path of the file in the database, while keeping the file itself on the server? Are there any other ...
0
votes
1answer
166 views

Looking for an up-to-date PHP Auth script to manage users

I have a client that has a rather generic, but established, website up and running. He now wants to add a simple UserAuth mechanism by which users can register (name,email) and access "member pages". ...
1
vote
2answers
271 views

Is it more efficient to query once for all settings, or query whenever a setting is needed?

For my blog script I have a usergroup and permission system set up. Each user is assigned to a usergroup and I have a long list of permission settings. Both are stored in a MySQL database. At the ...
0
votes
1answer
65 views

Should I implement functionality for an xml file+schema?

I am working on a script to get data from excel spreadsheets to a database. The data is from surveys conducted by our office where the data comes in with very little formatting. At the moment, the ...
2
votes
1answer
313 views

CMS and Databases vs. DIY

I have been programming for many years now, primarily in PHP and the like and would consider myself an intermediate programmer. Some of my online projects have now gone global and very widely used, i ...
1
vote
5answers
1k views

Does AJAX need to use a server-side language such as PHP/ASP.NET/Java to access a database?

Does AJAX need to use a server-side language such as PHP/ASP.NET/Java to access a database? Or some sort of web service tied to these languages? Or is AJAX able to communicate directly with the ...
2
votes
1answer
288 views

Active Record library with support for both SQL and NoSQL?

I'm looking for a PHP Active Record library that supports both SQL and NoSQL drivers (mongodb in particular). It doesn't matter if it actually has the NoSQL driver, I can write it myself, as long as ...
2
votes
4answers
487 views

Advice on making sure e-commerce site is secure using PHP and MySQL

Like the title says, I would like some advice from knowledgable web developers on figuring out security issues for my e-commerce site. I am designing the database as well as the code that ...
2
votes
1answer
997 views

How does Facebook calculate mutual friends?

How does Facebook calculate mutual friends? Does it cache all mutual friends for each user? Does it use MySQL to calculate mutual friends with a query?
4
votes
3answers
360 views

How do I determine which language/framework is best for our web-based project?

I'm in the early stages of development for a web application that has three developers (myself included) working on it. The project is, at its core, a web-based database that will be used by around ...
0
votes
1answer
68 views

What things should be considered in the license etc when you're using some open source projects/ tools in your application

What things should be considered in the license etc when you're using some open source projects/ tools in your application(in my case, specifically a web application/website) ? What are the ...