Font Size
Free Script installer FORUMS Ad management Portals and Cms Blogs Welcome Hepsia cPanel hosting
Free Script installer
You're about to get acquainted with a brand new mechanism of installing and managing PHP scripts. Our Elefante Installer allows you to install and manage blogs, forums, image galleries, content management systems, e-shops and many more, without any knowledge of basic programming languages such as HTML, PHP, etc. The Elefante Installer is a FREE PHP web application services installer which makes it easy for you to automatically install over 40 popular PHP script packages straight from your personal Web Hosting Control Panel or have the script insalled when you sign up ready for use.
Read the Full Story
FORUMS
An Internet forum is a discussion area on a website. Website members can post discussions and read and respond to posts by other forum members. An Internet forum can be focused on nearly any subject and a sense of an online community, or virtual community, tends to develop among forum members.
Read the Full Story
Ad management

Ad Management Scripts/Software

Pop-ups and other kinds of advertisements are a constant irritation for many Internet users. But, like all things media (such as television and radio), the web can't continue to exist without them. Whether webmasters like it or not, advertising helps pay their bills to keep their sites running. Therefore, it's always a good idea to know how to make them work for you. One way you can do this is to use ad management scripts or software. The sheer number available, online or otherwise, guarantees that you'll be able to find one that will fit your needs and budget.
Read the Full Story
Portals and Cms
A portal Web site is a Web site that aims to be your "portal," or entranceway,  to most anything you can do on the Web. For example, Yahoo is considered a  portal because it offers a search engine that helps you find other Web sites, as  well as topics categories such as finance,  travel, health, etc. that help you find information on the Web about those  topics. In the 1998-2001 phase of the Internet, many Web sites aspired to be  portals, because they believed it would mean users would use them as their  "start page" and visit frequently, even if they eventually left to visit other  Web sites. However, these days, most Web sites do not want to be mere start  pages; they want to keep you on their Web site for as long as possible, and not  take you to other Web sites.
Read the Full Story
Blogs

What's a blog?

A blog is a personal diary. A daily pulpit. A collaborative space. A political soapbox. A breaking-news outlet. A collection of links. Your own private thoughts. Memos to the world. Your blog is whatever you want it to be. There are millions of them, in all shapes and sizes, and there are no real rules. In simple terms, a blog is a website, where you write stuff on an ongoing basis. New stuff shows up at the top, so your visitors can read what's new. Then they comment on it or link to it or email you. Or not
Read the Full Story
Welcome
  • Upto unlimited GB Disc Space
  • Upto Unlimited Data Transfer
  • FTP, Stats
  • Upto unlimited Email Accounts
  • Free sub Domain Name
  • Free Site Builder
  • Unlimited Domain Hosting
 
Read the Full Story
Hepsia cPanel hosting

Hepsia Control Panel Top Features

You can now register, transfer or manage multiple domain names & websites from just one place. This is something cPanel has big problems with. Actually there is no Domain Manager at all in cPanel. With Hepsia you can set up and manage multiple fully independent websites from a single account. No need to have separate control panels (i.e. logins) for your domains, support tickets and billing.
Read the Full Story

Creating tables

In this section of the mysql training course we will explore the MySQL commands to create database tables and selecting the database.

Databases store data in tables. So what are these tables?
In simplest terms, tables consist of rows and columns. Each column defines data of a particular type. Rows contain individual records.
Consider the following:

Name Age Country Email
Manish Sharma 28 India manish@simply.com
John Doe 32 Australia j.dow@nowhere.com
John Wayne 48 U.S.A. jw@old.com
Alexander 19 Greece alex@conqueror.com

The table above contains four columns that store the name, age, country and email. Each row contains data for one individual. This is called a record. To find the country and email of Alexander, you’d first pick the name from the first column and and then look in the third and fourth columns of the same row.

A database can have many tables; it is tables, that contain the actual data. Hence, we can segregate related (or unrelated) data in different tables. For our employees database we’ll have one table that stores company details of the employees. The other table would contain personal information. Let’s make the first table.

The SQL command for creating tables looks complex when you view it for the first time. Don’t worry if you get confused, we’ll be discussing this in more detail in later sessions.

CREATE TABLE employee_data
(
emp_id int unsigned not null auto_increment primary key,
f_name varchar(20),
l_name varchar(20),
title varchar(30),
age int,
yos int,
salary int,
perks int,
email varchar(60)
);

Note: In MySQL, commands and column names are not case-sensitive; however, table and database names might be sensitive to case depending on the platform (as in Linux). You can thus, use create table instead of CREATE TABLE.

The CREATE TABLE keywords are followed by the name of the table we want to create, employee_data. Each line inside the parenthesis represents one column. These columns store the employee id, first name, last name, title, age, years of service with the company, salary, perks and emails of our employees and are given descriptive names emp_id, f_name, l_name, title, age, yos, salary, perks and email, respectively.

Each column name is followed by the column type. Column types define the type of data the column is set to contain. In our example, columns, f_name, l_name, title and email would contain small text strings, so we set the column type to varchar, which means varriable characters. The maximum number of characters for varchar columns is specified by a number enclosed in parenthesis immediately following the column name. Columns age, yos, salary and perks would contain numbers (integers), so we set the column type to int.

Our first column (emp_id) contains an employee id. Its column type looks really mean, yeh?. Let’s break it down.

int: specifies that the column type is an integer (a number).

unsigned: determines that the number will be unsigned (positive integer).

not null: specifies that the value cannot be null (empty); that is, each row in the column would have a value.

auto_increment: When MySQl comes across a column with an auto_increment attribute, it generates a new value that is one greater than the largest value in the column. Thus, we don’t need to supply values for this column, MySQL generates it for us! Also, it follows that each value in this column would be unique. (We’ll discuss the benefits of having unique values very shortly).

primary key: helps in indexing the column that help in faster searches. Each value has to be unique.

Why have a column with unique values?

Our company Bignet has grown tremendously over the past two years. We’ve recruited thousands. Don’t you think there is a fair chance that two employees might have the same name? Now, when that happens, how can we distinguish the records of these two employees unless we give them unique identification numbers? If we have a column with unique values, we can easily distinguish the two records. The best way to assign unique numbers is to let MySQL do it!

Using a database

We’ve already created our employees database. Now let’s start the mysql client program and select our database. Once at the mysql prompt, issue the command:

SELECT DATABASE();

The system responds with

mysql> SELECT DATABASE();
+------------+
| DATABASE() |
+------------+
|            |
+------------+
1 row in set (0.01 sec)

The above shows that no database has been selected. Actually, everytime we work with mysql client, we have to specify which database we plan to use. There are several ways of doing it.

Specifying the database name at the start; type the folowing at the system prompt:

mysql employees (under Windows)

mysql employees -u manish -p (under Linux)

Specifying the database with the USE statement at the mysql prompt:

mysql>USE employees;

Specifying the database with \u at the mysql prompt:

mysql>\u employees;

It’s necessary to specify the database we plan to use, else MySQL will throw an error.

Creating tables

Once you’ve selected the employees database, issue the CREATE TABLE command at the mysql prompt.

CREATE TABLE employee_data
(
emp_id int unsigned not null auto_increment primary key,
f_name varchar(20),
l_name varchar(20),
title varchar(30),
age int,
yos int,
salary int,
perks int,
email varchar(60)
);

Note: When you press the enter key after typing the first line, the mysql prompt changes to a ->. This means that mysql understands that the command is not complete and prompts you for additional statements. Remember, each mysql command ends with a semi-colon and each column declaration is separated by a comma. Also, you can type the entire command on one line if you so want.

You screen should look similar to:

mysql> CREATE TABLE employee_data
    -> (
    -> emp_id int unsigned not null auto_increment primary key,
    -> f_name varchar(20),
    -> l_name varchar(20),
    -> title varchar(30),
    -> age int,
    -> yos int,
    -> salary int,
    -> perks int,
    -> email varchar(60)
    -> );
Query OK, 0 rows affected (0.01 sec)

Okay, we just made our first table.

DMCA.com

Adds