Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Statement s7 = MySql.connection.createStatement(); for(int i = 0; i < 50 ; i++) { String test = "INSERT ignore INTO `testtable` (`name`,`Item"+i+"`,`Amount"+i+"`) values ('"+getUsername()+"','"+getItem(i)+"','"+getAmount(i)+"')"; s7.executeUpdate(test); }
Can anyone help me please???
SwePeso
Patron Saint of Lost Yaks
30421 Posts
Posted - 2008-06-24 : 07:51:08
What does "ignore" do in the INSERT statement?E 12°55'05.25"N 56°04'39.16"
SwePeso
Patron Saint of Lost Yaks
30421 Posts
Posted - 2008-06-24 : 07:51:54
String test = "INSERT INTO `testtable` (`name`,`Item`,`Amount`) values ('"+getUsername()+"','"+getItem(i)+"','"+getAmount(i)+"')";E 12°55'05.25"N 56°04'39.16"
jonas
Starting Member
6 Posts
Posted - 2008-06-24 : 08:28:16
i tried both, without result =/and about this: didn't try yet:
String test = "INSERT INTO `testtable` (`name`,`Item`,`Amount`) values ('"+getUsername()+"','"+getItem(i)+"','"+getAmount(i)+"')";
i got in my table rows with item1 amount1 item2 amount2 item3amount3so it wouldn't work? because u did `Item`,`Amount` without numbers ?Jonas
SwePeso
Patron Saint of Lost Yaks
30421 Posts
Posted - 2008-06-24 : 08:36:22
Or try over dbforums.com since this is a mysql question.E 12°55'05.25"N 56°04'39.16"
madhivanan
Premature Yak Congratulator
22864 Posts
Posted - 2008-06-24 : 08:59:31
or try at www.mysql.comMadhivananFailing to plan is Planning to fail
jonas
Starting Member
6 Posts
Posted - 2008-06-24 : 12:07:33
I still didn't found itsomeone knows it? please tell mee
tkizer
Almighty SQL Goddess
38200 Posts
Posted - 2008-06-24 : 12:23:06
jonas, you've posted your question on a Microsoft SQL Server site. This is not a MySql site. You should post your question on a MySql site such as the ones already suggested to you.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog