Barry napsal(a):
Hello Everyone! I am having a big problem with counting inserting rows. This is my Query: SELECT MAX(id) INTO @maxid FROM table1; // @maxid is now 44 INSERT INTO table2 (orderid, someothervars) SELECT @maxid +1, blahvar FROM table3;
try select @maxid:=max(id)-1 from table1; insert into table2 (orderid, someothervars) SELECT @maxid:[EMAIL PROTECTED] +1, blahvar FROM table3; dusan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]