Tagged Questions
37
votes
11answers
2k views
Why isn't protection against SQL injection a high priority?
On Stack Overflow, I see a lot of PHP code in questions and answers that have MySQL queries that are highly vulnerable to SQL injection attacks, despite basic workarounds being widely available for ...
22
votes
3answers
7k views
How to build completely modular web applications [closed]
In the coming months we're going to begin a project where we take a system we've built for a client (v1) and rebuild it from scratch. Our goal with v2 is to make it modular, so that this specific ...
20
votes
10answers
2k views
Struggling as a programmer. Need some advice [closed]
I've been a developer now for a number of years. I'm pretty good at what I do and can "get the job done".
But, there is a difference between "getting the job done" and "doing the job properly". Let's ...
16
votes
3answers
1k views
How to design website workflow?
I have been thinking about this for really long time without reaching an optimum answer.
First of all, I'm a medical doctor who loves programming but never really studied it, except for home learning ...
13
votes
4answers
815 views
What to do when your company doesn't encrypt passwords
Background
I'm been contracted to help a company maintain their server. I work on some minor PHP projects but also look over performance issues and recently, scan logs for hackers.
These guys have ...
12
votes
2answers
434 views
How to temporarily save the result of the query, to use in another?
I have this problem I think you may help me with.
P.S. I'm not sure how to call this, so if anyone finds a more appropriate title, please do edit.
Background
I'm making this application for ...
11
votes
5answers
402 views
When is it better to offload work to the RDBMS rather than to do it in code?
Okay, I'll cop to it: I'm a better coder than I am at databases, and I'm wondering where thoughts on "best practices" lie on the subject of doing "simple" calculations in the SQL query vs. in the ...
11
votes
5answers
762 views
What Do I Need To Know About Servers In a Web Development Role? [closed]
I know that may sound a little vague, so I'll try and explain a little further...
After being self employed developer for many years I'm now in search of a commercial web developer role. My only ...
9
votes
2answers
27k views
Datetime vs Timestamp in MySQL and PHP in practice?
I am not sure how to specify my datatype as datetime or timestamp, I think I will need both of them but on the different events. My website sells products and services worldwide and also have an ...
9
votes
5answers
947 views
Advice for good web server development setup [closed]
A month or so ago I created my first LAMP stack and implemented a simple web site that exercised each letter in that acronym. However my development setup was much less than ideal.
I don't really ...
8
votes
5answers
514 views
Most common website scalability pitfalls
We are designing a website/web application where we hope to to achieve high user counts and, in general, lots of use. More specifically, we intend to be using PHP as the programming/scripting language ...
7
votes
6answers
6k views
Should I encrypt data in database?
I have a client, for which I'm going to do an Web application about patient care, managing patients, consults, history, calendars, everything about that basically.
The problem is that this is ...
7
votes
3answers
976 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 ...
7
votes
4answers
1k views
what is a good way to show mysql experience?
As always, if this is a duplicate question that I have yet to uncover, please feel free to close or delete it.
I'm attempting to get into the programming industry. I've focused mainly on PHP due to ...
7
votes
4answers
432 views
OOP design question
I'm working on an application written in PHP using OOP principles. The classes in my application usually represent a table in the database; for instance, 'student', 'teacher', 'class', 'schedule', ...
7
votes
1answer
368 views
Need help - brainstorming php scheduler class
I've never written a php class before from scratch. But I guess you have to start somewhere right? I've got an idea, but need help with logic. Please tell me what you think. Below is shorthand ...
6
votes
1answer
330 views
General approach to re-factoring an large, very badly written legacy system [duplicate]
Possible Duplicate:
Techniques to re-factor garbage and maintain sanity?
What is a good way to refactor a large, terribly written code base by myself?
Really open question here. I'm not ...
6
votes
8answers
392 views
How to (professionally) back up reasons for choosing open source technologies in a large project
I know the title is a bit vague so I'll try to be more precise in explaining what's my actual question (I apologize in advance if this is a duplicate).
I work for a small company (8 people) that ...
6
votes
2answers
3k views
What is the best way to handle different TimeZones?
I'm working on a web application where there will be many different users from all over the world making updates. I'm wondering what the best way to handle timezones would be? Ideally, as an event ...
6
votes
2answers
462 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?
...
5
votes
4answers
451 views
QR Codes as Booking Confirmations for Conference?
A client of mine is holding a conference and we have the task of creating a booking system for them. However they have requested that we use QR codes so that on the door, a person can simply present ...
5
votes
7answers
6k views
What is the best way to INSERT a large dataset into a MySQL database (or any database in general)
As part of a PHP project, I have to insert a row into a MySQL database. I'm obviously used to doing this, but this required inserting into 90 columns in one query. The resulting query looks horrible ...
5
votes
2answers
418 views
Is mysql_* deprecated after PDO was introduced?
I have been noticing for a long time on Stack Overflow that most users recommend to use PDO instead of mysql_*, because PDO is more secure than mysql_*. But my question is if websites which are ...
5
votes
2answers
381 views
When should I start the server side coding?
I am creating a website, where users can upload their own videos. So far I am just building the main structure with HTML and CSS. Is it a better practice to write server-side code before the site ...
4
votes
1answer
321 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 ...
4
votes
2answers
619 views
DRY with Dynamic SQL vs. prepared statements
When dealing with data, one finds that, essentially, the same code is repeated in various incarnations:
-- MySQL:
CREATE TABLE users (
id int NOT NULL auto_increment PRIMARY KEY,
name ...
3
votes
3answers
801 views
Why put SQL statement in a variable before using mysql_query()?
I'm been working with PHP on and off for a bit now, and I've seen plenty of code both ways:
$sql = "SELECT …";
mysql_query($sql);
vs
mysql_query("SELECT…");
Is there a reason for separating the ...
3
votes
5answers
3k views
Is database based chat room bad idea?
Most of simple "group chat" systems are based on local file storage logs (e.g. log.txt ).
I'm developing a simple group chat (under 20 users simultaneity ) with jQuery/AJAX.
So basically, ...
3
votes
2answers
944 views
I need advice developing a sensitive data transfer/storage/encryption system
I got closed on SO and told to post this here as it's about general application design as opposed to specific code.
Intro
I'm currently working on a project which involves the daily extraction of ...
3
votes
5answers
1k views
For a large website developed in PHP, is it necessary to have a framework?
I am wondering if it is necessary to have a framework or if it is a must-have if I plan to make a large website. Large website could mean a lot of things: in other words, multiple dynamic web pages ...
3
votes
4answers
731 views
My father wants to learn PHP-MySQL to port his application. What I should do to help?
My father is a doctor/physician. About 15 years ago he started writing an application to handle his patient's medical records in his clinic at home. The app has the ability to input patient's medical ...
3
votes
1answer
128 views
Should a stored proc try to do more, in the attempt to avoid php mysql back and forth overhead
I have a REST architecture, running PHP on the server side which store
and query a Mysql database.
I am re-evaluating one architecture design decision:
DECISION to re-evaluate:
In an attempt to ...
3
votes
2answers
636 views
Having a generic data type for a database table column, is it “good” practice?
I'm working on a PHP project where some object (class member) may contain different data type. For example :
class Property {
private $_id; // (PK)
private $_ref_id; // the object ...
3
votes
2answers
323 views
Displaying items with a countdown timer
I am creating a widget for rotating topics. The functionality is as follows:
Each topic is displayed one by one on the homepage and has a duration of 30 seconds.
A countdown timer is displayed on ...
3
votes
6answers
957 views
OOP (php) for beginners - some unclarities
I started reading some tutorials about OOP, because I want to learn the basics.
I have a question about it. I understand how you can have a object "Car" and give it a color like this ...
3
votes
1answer
814 views
Is “PHP and MySQL Web Development, 4th ed.” an outdated book to learn from?
I want to get into web stuff, and thought of going with PHP+MySQL. I have experience in C#, C++, desktop graphics, but no web stuff besides HTML, CSS which I started learning 2 months ago.
On SO ...
2
votes
6answers
2k views
Is it possible to keep only one Database for both web and desktop applications?
I'm experiencing a trouble with my business model, let me explain better.
I'm developing a software for 1 year and few months, it's for the food industry, more exactly a software to: Delivery, Take ...
2
votes
1answer
366 views
Is it safe to use LAST_INSERT_ID() in a system like Point of Sale
Is it safe to use LAST_INSERT_ID() in a system using MySQL like Point Of Sale when there are multiple users using the system at the same time?
2
votes
1answer
1k 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?
2
votes
3answers
3k 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 ...
2
votes
3answers
576 views
Is it safe to just use MySQLi?
I have developed an open source PHP application and currently it uses both the MySQLi or MySQL extension for backwards compatibility. I'm wondering about switching it over to only be compatible with ...
2
votes
5answers
696 views
How to automate a tasks system in a CMS software
I'm currently developing v2.0 of my personal cms. However, I'm stuck. I strongly feel that my old solution for "tasks" is not very dynamic and must be revisited. Currently I'm looking the whole ...
2
votes
3answers
655 views
High traffic chat - how to check if there is new message and show it for all users
I already had question about this but obviously it was not accepted very well, apparently too long when it's actually more information so you could have given me better answer.
Ok, I will be much ...
2
votes
3answers
344 views
Application Logic Vs DB Triggers for database cleaning
When cleaning out old data from a set of database tables, is it safer to have the logic in the application or in a database trigger?
I am upgrading an application that I wrote a while back (and in a ...
2
votes
4answers
765 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
2answers
178 views
Better way to search for text in two columns
Here is the scenario. I am making a custom blogging software for my site. I am implementing a search feature. It's not very sophisticated - basically it just takes the search phrase entered and runs ...
2
votes
3answers
626 views
Defining work days and work time
I'm working on development of SMS parking software, and I'm stuck at one point for a month... I need to implement periods of payment (or work time, of a work day, if you will). Here's the problem:
...
2
votes
1answer
414 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 ...
2
votes
1answer
127 views
Doubt regarding search engine/plugin(One present on the website itself)
I am new to web development and trying to study various types of websites as case study. Right now my focus is on how search engines works for an eCommerce website.
I know basic functioning for a ...
2
votes
1answer
149 views
PHP Cache Strategy - Genius or Sheer Stupidity?
I have a shared hosting with limited capabilities. Memcache and mod_cache are not available to me. I would like to implement my own PHP caching method to cache the results of load-intensive SQL query. ...