With all due respect, this is way outside the Lingo, or even Macromedia, sphere. You'd probably be better served on a SQL mailing list.

Tab Julius
List adminstrator, Lingo-L

At 11:20 PM 12/10/02, Jeremy wrote:
Min and max select the min or max value that exists in the list. What
I'm looking for is a way to find the mininum number spawngroupID that
isnt in the table, basically the first free one. The database isn't mine
to alter, but I will see if I can get them to make that field
auto_increment.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Robert Tweed
Sent: Tuesday, December 10, 2002 4:35 PM
To: [EMAIL PROTECTED]
Subject: Re: <lingo-l> Any mySQL guru's on the list?


----- Original Message -----
From: "Jeremy" <[EMAIL PROTECTED]>
>
> Finally, heres the issue I am having. Since the spawngroupID field in
> the database I am inserting into is not an auto_increment field

Off the top of my head, I think this should do it:

SELECT MAX( spawngroupID ) FROM whicheverTable

You should probably make it an auto-increment if possible, just for
speed. Still, if not, at least make it a unique indexed field. I have no
idea what sort of performance you should expect for a largish table with
such a query, but it's probably a fair bit slower than an auto-increment
field.

- Robert
[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to