Query create database
Starting with 70-270 and then going on to 646-204 followed by 70-620 is advisable for those who have done their 220-601 or 70-649 and are therefore exempted from SY0-101.
This is most use for create database from php
mysql_query( “CREATE TABLE database_name
( code to be executed )
TYPE=MyISAM;
“) or error( mysql_error() );
example in php
mysql_query( “CREATE TABLE reseller (
`user_id` smallint(5) unsigned NOT NULL auto_increment,
`username` varchar(30) NOT NULL default ”,
`passwd` varchar(30) NOT NULL default ”,
`name` varchar(30) NOT NULL default ”,
`email` varchar(50) NOT NULL default ”,
PRIMARY KEY (`user_id`)
) TYPE=MyISAM;
“) or error( mysql_error() );
That code will create database table that contain :
- user_id - small integer 5 digit
- username - variable character 30 chr
- passwd - variable character 30 chr
- name - variable character 30 chr
- email - variable character 50 chr
with user_id as primary key that can not contain same value.
Related post :

April 29th, 2008 at 6:10 am
[…] Forcescript.com Learn script php for making website « Query create database […]
reply