I have used below sql to create two tables to mysql database and connect the database…
- User
I have used below sql to create two tables to mysql database and connect the database with $db by php's PDO.
CREATE TABLE sg_businesstype ( businesstypeid int not null auto_increment, businesstype varchar(80), primary key (businesstypeid) );
insert into sg_businesstype ( businesstype ) values ('Buying Agent'), ('Dealer / Reseller'), ('Distributor'), ('Manufacturer / OEM'), ('Not Known'), ('Retailer'), ('Service Provider');
CREATE TABLE sg_users ( sgid int not null auto_increment, email varchar(80) not null, name varchar(60) not null, usertype int not null default 1, company varchar(80) null, tel varchar(25) null, mobile varchar(25) null, businesstypeid int null, newsletter boolean default false, status boolean default true, rating int default 0, registerdate timestamp not null default CURRENT_TIMESTAMP, logo varchar(255) null, primary key (sgid), foreign key (businesstypeid) references sg_businesstype (businesstypeid) );
give me a bootstrap form to maintain the table sg_users.
- Assistant