database posts

Automate WordPress Installation and Development WorkFlow

Do you work on multiple sites at a time? Then no doubt you would love to improve your speed and your overall development workflow. Think of what it takes to set up WordPress the old school way: Downloading the latest version. Extracting the downloaded zip file. Creating a new database. Creating wp-config.php file. Developing WordPress sites has never been easier with WAMP and Simple WordPress Auto Installer.  The Auto Installer script is now available that allows you to add a WordPress install within...
PHP

Create your own CRUD app with PHP & MySQL (Part 2)

Picking up from where we left off, we need to start by creating some HTML to display the data we’ve stored in the $results variable. You can always modify this to suite your project. I’ll be using a table structure. <!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <link href="styles/theme.css" rel="stylesheet"/> <title>PHP & MySQL</title>\ </head> <body> <div id="wrapper"> <table> <thead> <th>Title</th>...

MySQL – Deletion History Part 1

MySQL stored procedure's come in really handy at times. I like to let the database do the work for me sometimes. For example, in an e-commerce system you may need to calculate a tax. For our example today though, we will use the tables we made in my previous article on the XREF table. We are going to focus this tutorial on getting the appropriate tables in place to preform our history logging. To start, we are going to create a module's table so that our history table can be one table instead of many and we are...

The XREF table for MySQL

The XREF, or cross reference table, is a database table that links records together. These tables are very good for normalization in your database. I almost always use an xref when I need an many to many relationship. Usually XREF tables have only two columns with no Primary Key. That's right, the two columns together make them unique. They are both Foreign Keys to other tables. A real life example of this would be in any standard CRM. Let's go over this example right now. Many CRM's could have a table to store...
PHP

PHP User Survey: Setting Variable Values and Reading from Tables

In Part I of this series, we started the process of creating user polls for a business web site. Part I gave the layout of the data layer and began the construction of the class file.  In this part we will continue with adding methods to the class file that will enable the administrator to set the variable values and read from the database tables. The setPollId($iPollId) method sets the value for the _iPollId variable.  Since the constructor method calls the setPollId($iPollId) method, we must...

Create Your Own CRUD App with MySQL and PHP

You’re may be wondering what exactly CRUD is. CRUD simply stands for Create, Read, Update and Delete and it is the one of the fundamental principles of programming logic that can be expanded and applied to larger projects. For example, let’s imagine we’re creating a social network and we like to have the ability for users to create accounts, edit and update information for those accounts and also delete said accounts; that is CRUD at work. Now let’s get started using PHP & MySQL, to...
PHP

Common Mistakes to Avoid When Coding in PHP

By
Despite the high expectations placed on them at times, developers are human. They were the last time we checked anyways. As humans, we are bound to make mistakes from time to time. And simple, common mistakes often slip past our filters the more comfortable we become with something. Think about it, when you first started writing code you most likely checked every line to make sure things were perfect. As you grow more comfortable with the process, little things often get overlooked and mistakes are made....

How to Prevent a SQL Injection Attack

A SQL injection is a common programming error the consequences of which can be really devastating. Many successful hacking attacks start when a hacker discovers a vulnerability that gives an opportunity to inject SQL code. When an SQL injection occurs, the structure of an SQL query is compromised and as a result you are left at the mercy of the potential hackers. If there is a vulnerability found, hackers can exploit it to gain access not only to your site and database but in extreme cases also to your corporate...
Load more
Home CSS Deals DesignBombs HTML HTML5 JavaScript jQuery Miscellaneous Mobile MySQL News PHP Resources Security Snippet Tools Tutorial Web Development Web Services WordPress