Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
create mysql table
12-04-2013, 09:03 AM
Post: #1
create mysql table
<?php
// Create a MySQL table in the selected database
mysql_query("CREATE TABLE example(
id INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id),
name VARCHAR(30),
age INT)")
or die(mysql_error());
echo "Table Created!";
?>
Find all posts by this user
Like Post Quote this message in a reply
[-] The following 3 users Like josephyala's post:
Ravisain (02-09-2014), the (04-04-2014), zigzag-nazmul (05-27-2014)
11-25-2014, 10:50 AM (This post was last modified: 11-25-2014 10:53 AM by matrimony.)
Post: #2
RE: create mysql table
tamil matrimonial

Hi guys,The CREATE TABLE statement is used to create a table in a database.
SQL CREATE TABLE Syntax
CREATE TABLE table_name
(
column_name1 data_type(size),
column_name2 data_type(size),
column_name3 data_type(size),
....
);
The column_name parameters specify the names of the columns of the table.
The data_type parameter specifies what type of data the column can hold (e.g. varchar, integer, decimal, date, etc.).
The size parameter specifies the maximum length of the column of the table.
Example
CREATE TABLE Persons
(
PersonID int,
LastName varchar(255),
FirstName varchar(255),
Address varchar(255),
City varchar(255)
);

Thank youwinking

tamil matrimony
Visit this user's website Find all posts by this user
Like Post Quote this message in a reply
02-08-2015, 07:31 AM
Post: #3
RE: create mysql table
mysql_query() is depreciated. Use mysqli_query
Find all posts by this user
Like Post Quote this message in a reply
[-] The following 1 user Likes bearnithi's post:
Ugurxl (06-01-2015)
04-16-2016, 11:25 AM
Post: #4
RE: create mysql table
how can I backup my phpMyAdmin
Find all posts by this user
Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)