I have created two tables to mysql database using below sql: CREATE TABLE sgbusinesstype…
- User
I have created two tables to mysql database using below sql: 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) );
- Assistant
These two tables are related through the businesstypeid column in the sg_users table, which is a foreign key referencing the businesstypeid column in the sg_businesstype table. This means that for each user in the sg_users table, their business type must exist in the sg_businesstype table. This relationship allows for efficient querying of users based on their business type, as well as maintaining data integrity by ensuring only valid business types are associated with users.
- User
Using bootstrap to make maintain the table sg_users. Give me a code (php / javascript / html /css) to retrieve and modify the data and using the email as key to retrieve the data. Suppose the email will pass to the form with $ls_email.
- Assistant