Archive

Archive for the ‘MySQL’ Category

Video Tutorial: Adding Images to the Master/Detail pages

August 8th, 2009

Watch Video | Download Video

In this video I go over how to add images to your master detail pages.

Author: Erikk Categories: IMD323, IMD331, MySQL Tags: , ,

AJAX Autocomplete Example

July 9th, 2009

In this video, I show how to build a simple autocomplete search box. You have probably seen this feature on popular sites such as Netflix, Google, Hulu and Adobe. When you start to type in a search box, you get results returned immediately that match what you typed.

I used PHP, MySQL and jQuery to create this example.

What you need to do in order to get this to work:

In order to get this working on your site, you will need to follow a few steps.

  1. Setup your database. You can use a database you already have or create a new one. If you already have a database and table created you can skip this step. You can view my other MySQL tutorials for more details on setting up a database.

  2. Modify the include/dbconn.php file. You will need to modify this file to connect to your database. You will need to provide your server name, username, password and database name.

  3. Possibly make changes to get_customers.php. You will most likely have to make some changes to this file as well in order to use your own table name.

    For example, on line 9 my query looks like this:
    $query = "SELECT first_name, last_name FROM Customers WHERE last_name LIKE '%" . $queryString . "%' ORDER BY last_name, first_name";

    You will have to change that line of code to match your database table and column names.

    You will also need to modify this line of code from get_customers.php:
    echo '<li onclick="fill(\'' . $row['first_name'] . ' ' . $row['last_name'] . '\');">' . $row['first_name'] . ' ' . $row['last_name'] . '</li>';


    You will need to change $row['first_name'] and $row['last_name'] to match the name of your columns.

Watch Video | View live example | Autocomplete Code


Video Tutorial: MySQL Setup Through OLS

May 7th, 2009

Watch Video | Download Video

This video shows you how to create a new MySQL database on your OLS server. Then I go into using phpMyAdmin to create the tables in your database. Finally I show a simple PHP page that will pull the information out of the database and display it in a web page. I also have several other videos about MySQL and data access, including using Dreamweaver to write the PHP code for you.

Author: Erikk Categories: IMD312, IMD323, IMD331, MySQL, OLS, Tutorial Tags: , , , , ,

Video Tutorial: SQL

May 4th, 2009

Watch Video | Download Video

In this video I go over the basics of SQL.

Author: Erikk Categories: IMD323, MySQL, Tutorial Tags:

Video Tutorial: Using Microsoft Access to Create SQL Queries

April 20th, 2009

Watch Video | Download Video

This video tutorial shows you how to use Microsoft Access to create SQL queries. The advantage to using Access is that it has a gui based tool that will help you create the query.

Author: Erikk Categories: IMD323, IMD331, MySQL, Tutorial Tags: , , ,

AJAX Tutorials

April 12th, 2009

These tutorials show you how to incorporate AJAX into a PHP/MySql Web site. I’ve split this up into two tutorials. The first is an introdution to AJAX, explaining what AJAX is and showing several examples of it in use. The second video shows you how to create a simple AJAX application.

Watch Videos

  1. AJAX Introduction
  2. Using AJAX with PHP and MySql

View Live Demo | Download Code

Database
The database for this example is very simple. It contains a single table called Users. The Users table has the following columns: id, username, password, email, gender, and age. View the picture below for more details on the database table.

Users Definition

Users Definition

Links

Video Tutorial: SQL – Select Statements

March 31st, 2009

Watch video | Download video

In this video I go over some basic SQL Select statements.I use MySQL Administrator to write and test the queries in.

If you are in IMD312 this video covers Week 4 Assignment 3

Author: Erikk Categories: IMD312, IMD331, MySQL, Tutorial Tags:

Video Tutorial: Blog Example Search Page

March 28th, 2009

Watch video | Download video

This video expands upon the Blog Example video and shows how to create a simple search page.

The code used in the video can be downloaded here. To see the blog example in use check out http://er5325.aisites.com/blog_example/.

Author: Erikk Categories: IMD323, IMD331, MySQL, Tutorial Tags: , , ,

Video Tutorial: Blog Example

March 28th, 2009

Watch video | Download video

This video shows how to create a web page that displays records from your database. In this example, we code all the PHP ourselves, instead of relying on Dreamweaver. It uses a simple blog as an example.

The code used in the video can be downloaded here. The example files expand upon the video. There is a master page (index.php) which lists all the blog postings. There is a details page (blog.php) and a search page (search.php). I also have a video detailing how to create the search page.

To see the blog example in use check out http://er5325.aisites.com/blog_example/.

Author: Erikk Categories: IMD323, IMD331, MySQL, Tutorial Tags: , , ,

Video Tutorial: Master Detail Pages

March 27th, 2009

Watch Video | Download Video

This video shows how to use Dreamweaver to create a master page which displays all the records from your database and then a details page which will show the details of a given record.

For IMD331: Web Site Development II this is for Week 4 Assignment 2.

I skip over how to create the database connection in this video because we did it in a previous one. If you do not remember how to create the connection please watch Using Dreamweaver to display data from MySQL

Screenshot of the master page

Screenshot of the master page

Screenshot of the details page

Screenshot of the details page