> Dušan Pavlica schrieb:
>> 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;
>> select @maxid:=max(id)-1 from table1;
>> insert into table2 (orderid, someothervars)
>> SELECT @maxid:=@maxid +1, blahvar FROM table3;
> Thanks dusan, thanks filip that works perfect :)
> Can you tell me where i can find that " := " function on the mysql dev
> site? Search function don't allow " := " and i didn't found it.
> That would be very nice :)
> My best regards
it's not function, it's assignment operator. Try to search 'user-defined
variables' in manual. It's chapter 9.3 in version I have