help~casual

08/19/2010 16:43 mikhailtbd05#1
i need help.......how to make new casual........i had make a casual query....but when im batch it.....by db broke...

Code:
delete from cq_itemtype where id >= 199020;
delete from cq_itemtype where id >= 199000;
delete from cq_goods where id >= 1999821;
delete from cq_goods where id >= 1999822;

INSERT INTO `cq_itemtype` (`id`,`name`,`req_profession`,`level`,`req_level`,`req_sex`) VALUES
( '199020', 'GoldenCoat', '0', '0', '0', '1');

INSERT INTO `cq_itemtype` (`id`,`name`,`req_profession`,`level`,`req_level`,`req_sex`) VALUES
( '199000', 'WingRobe', '0', '0', '0', '1');

INSERT INTO `cq_goods` (`id`,`ownerid`,`itemtype`,`name`) VALUES ( '1999821', '1207', '199020', '0');
INSERT INTO `cq_goods` (`id`,`ownerid`,`itemtype`,`name`) VALUES ( '1999822', '1207', '199000', '0');
please check it.... it's correct or not...
08/19/2010 17:31 PraDevil[ELITE]#2
why not u check it by ur self? its make you learn more about it..
08/19/2010 17:56 Jack Sparrow#3
Quote:
Originally Posted by mikhailtbd05 View Post
i need help.......how to make new casual........i had make a casual query....but when im batch it.....by db broke...

Code:
delete from cq_itemtype where id >= 199020;
delete from cq_itemtype where id >= 199000;
delete from cq_goods where id >= 1999821;
delete from cq_goods where id >= 1999822;

INSERT INTO `cq_itemtype` (`id`,`name`,`req_profession`,`level`,`req_level`,`req_sex`) VALUES
( '199020', 'GoldenCoat', '0', '0', '0', '1');

INSERT INTO `cq_itemtype` (`id`,`name`,`req_profession`,`level`,`req_level`,`req_sex`) VALUES
( '199000', 'WingRobe', '0', '0', '0', '1');

INSERT INTO `cq_goods` (`id`,`ownerid`,`itemtype`,`name`) VALUES ( '1999821', '1207', '199020', '0');
INSERT INTO `cq_goods` (`id`,`ownerid`,`itemtype`,`name`) VALUES ( '1999822', '1207', '199000', '0');
please check it.... it's correct or not...

it should be like this


Code:
delete from cq_itemtype where id >= 199020;
delete from cq_itemtype where id >= 199000;
delete from cq_goods where id >= 1999821;
delete from cq_goods where id >= 1999822;


INSERT INTO `cq_itemtype` VALUES ('199020', 'GoldenCoat', '0', '0', '0', '1', '0', '0', '0', '0', '28', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '10000', '10000', '0', '0', '0', '0', '0', '0', '0', '0', '00', '00', '00', '0000', '0000', '0', '0', '5000', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');


INSERT INTO `cq_itemtype` VALUES ('199000', 'WingRobe', '0', '0', '0', '1', '0', '0', '0', '0', '28', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '10000', '10000', '0', '0', '0', '0', '0', '0', '0', '0', '00', '00', '00', '0000', '0000', '0', '0', '5000', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');


INSERT INTO `cq_goods` (`id`,`ownerid`,`itemtype`,`name`) VALUES ( '1999821', '1207', '199020', '0');
INSERT INTO `cq_goods` (`id`,`ownerid`,`itemtype`,`name`) VALUES ( '1999822', '1207', '199000', '0');
08/20/2010 11:37 mikhailtbd05#4
Quote:
delete from cq_itemtype where id >= 199020;
delete from cq_itemtype where id >= 199000;
delete from cq_goods where id >= 1999821;
delete from cq_goods where id >= 1999822;


INSERT INTO `cq_itemtype` VALUES ('199020', 'GoldenCoat', '0', '0', '0', '1', '0', '0', '0', '0', '28', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '10000', '10000', '0', '0', '0', '0', '0', '0', '0', '0', '00', '00', '00', '0000', '0000', '0', '0', '5000', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');


INSERT INTO `cq_itemtype` VALUES ('199000', 'WingRobe', '0', '0', '0', '1', '0', '0', '0', '0', '28', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '10000', '10000', '0', '0', '0', '0', '0', '0', '0', '0', '00', '00', '00', '0000', '0000', '0', '0', '5000', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');


INSERT INTO `cq_goods` (`id`,`ownerid`,`itemtype`,`name`) VALUES ( '1999821', '1207', '199020', '0');
INSERT INTO `cq_goods` (`id`,`ownerid`,`itemtype`,`name`) VALUES ( '1999822', '1207', '199000', '0');
when i batch it...

[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 'elete from cq_itemtype where id >= 199020' at line 1
[Err] elete from cq_itemtype where id >= 199020;
[Msg] Finished - Unsuccessfully
08/20/2010 12:44 Jack Sparrow#5
Quote:
Originally Posted by mikhailtbd05 View Post
when i batch it...

[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 'elete from cq_itemtype where id >= 199020' at line 1
[Err] elete from cq_itemtype where id >= 199020;
[Msg] Finished - Unsuccessfully
Thats what i get when i run it
Code:
 [SQL] delete from cq_itemtype where id >= 199020;
Affected rows: 1
Time: 0.266ms

[SQL] 
delete from cq_itemtype where id >= 199000;
Affected rows: 1
Time: 0.000ms

[SQL] 
delete from cq_goods where id >= 1999821;
Affected rows: 2
Time: 0.062ms

[SQL] 
delete from cq_goods where id >= 1999822;
Affected rows: 0
Time: 0.000ms

[SQL] 


INSERT INTO `cq_itemtype` VALUES ('199020', 'GoldenCoat', '0', '0', '0', '1', '0', '0', '0', '0', '28', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '10000', '10000', '0', '0', '0', '0', '0', '0', '0', '0', '00', '00', '00', '0000', '0000', '0', '0', '5000', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
Affected rows: 1
Time: 0.000ms

[SQL] 


INSERT INTO `cq_itemtype` VALUES ('199000', 'WingRobe', '0', '0', '0', '1', '0', '0', '0', '0', '28', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '10000', '10000', '0', '0', '0', '0', '0', '0', '0', '0', '00', '00', '00', '0000', '0000', '0', '0', '5000', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
Affected rows: 1
Time: 0.000ms

[SQL] 


INSERT INTO `cq_goods` (`id`,`ownerid`,`itemtype`,`name`) VALUES ( '1999821', '1207', '199020', '0');
Affected rows: 1
Time: 0.000ms

[SQL] 
INSERT INTO `cq_goods` (`id`,`ownerid`,`itemtype`,`name`) VALUES ( '1999822', '1207', '199000', '0');
Affected rows: 1
Time: 0.000ms

so i think the problem is your navicat version or something like that..
08/20/2010 12:48 Drenferalis#6
Quote:
Originally Posted by mikhailtbd05 View Post
when i batch it...

[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 'elete from cq_itemtype where id >= 199020' at line 1
[Err] elete from cq_itemtype where id >= 199020;
[Msg] Finished - Unsuccessfully
Why are you batching it? just query it, and btw you missed the d in delete...

:cool:
08/20/2010 14:39 mikhailtbd05#7
ooo....thanks....very helpfull