Why do you need it to be in one statement?  The only reason I can
think of is that in order to prevent synchronisation issues you need
the two statements to be atomic.

In MSSQL I would use a TSQL stored procedure:

CREATE PROCEDURE dbo.MyProcedure
  @param INTEGER
AS
  UPDATE table SET boolfield = whatever WHERE yada yada
  SELECT a,b,c FROM table WHERE fie...@param LIMIT 1
RETURN
GO

and so on.  (Hey is your boolfield one of a,b,c?)

But you're using MySQL.  I think MySQL supports stored procedures in
version 5 onwards.  If you're using anything older, I think you're
screwed.

--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to