On Fri, March 23, 2007 10:07 am, Dan Shirah wrote:
> The reason I have to use it as I posted is because I am using
> Microsoft SQL
> server instead of MySQL.  And I haven't found a php function for MSSQL
> that
> works the same as mysql_insert_id()

I guarantee that there is a way to do it in MSSQL, somehow...

I think it might be:

SELECT @INSERT;

Or maybe it was:

SELECT @@INSERT

Something like that.

Find a SQL Server list and ask them.  They'll know for sure.

> I figure the odds of another record being inserted inbetween the time
> it
> takes to go from step 3 to step 4 are very, very minimal.  We're
> talking
> about MAYBE a 2-3 millisecond gap?

No, we are NOT talking about a 2-3 millisecond gap.

As soon as your server gets even a little busy, your script is getting
"interrupted" by the other scripts trying to run, and you are just
playing russian roulette on whether it happens now or tomorrow that
you get this all messed up.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to