[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'create table Goods
(
goods_id int not null auto_increment,
' at line 3
[Err] select * from user ;
select * from user where user_name='xiaoming' and user_pass='pass1'
create table Goods
(
goods_id int not null auto_increment,
brand_id int,
goods_name text,
is_special varchar(10),
goods_price decimal(10,2),
goods_off_price decimal(10,2),
goods_description text,
goods_image_path text,
primary key (goods_id)
);
insert into brand(brand_name) values('IPhone'),('Samsung'),('Mi'),('Nokia') ;
select * from brand ;
insert into goods(brand_id,goods_name,is_special,goods_price,goods_off_price,
goods_description,goods_image_path)
values(1,'IPhone 5','true',1000,800,'IPhone 5','/images/iphone.png'),
(2,'galaxy-note','true',1200,900,'galaxy-note','/images/galaxy-note.jpg'),
(3,'Mi Mix','false',1500,1000,'Mi Mix','/images/Z1.png'),
(4,'Nokia 9','false',1300,1000,'Nokia 9','/images/galaxy-s4.jpg');
select * from goods ;
select * from cart ;
select last_insert_id() ;
select * from cart where user_id=3;
select * from cart_goods
select g.*,cg.goods_qty from cart_goods cg,goods g
where cart_id=(select cart_id from cart where user_id=3) )
[Msg] Finished - Unsuccessfully
--------------------------------------------------