MySQL posts

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...
read more

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...
read more

Creating a PHP User Survey: Database Tables and Class File Constructor

User surveys can be an extremely effective marketing tool for any business web site. Visitors can make their voices heard on what products, services and information they would like the site to provide. Site owners can then adjust their marketing plans and promotions around the results of these polls. In order to build a basic user poll, we must first create the database tables that will hold the poll question and its various responses. Create the MySQL Polls Table ... First, we must build a database table...
read more

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...
read more

Installing and Configuring a WAMP Server on Your Computer

There are times when we are so anxious to jump into creating something new that we forget to cover the basics. For web developers it is important, actually vital, to have the ability to test your projects locally before they go live. While much of the web relies on a Linux, Apache, MySQL, PHP stack, or LAMP, to power applications and dynamic websites, not everyone codes in a Linux environment. Those who prefer Windows can still replicate how their code will work by using WAMP to replicate a live web environment...
read more
Load more