Hi,

Im sorry, I was not putting the hole explanation, but here it is.

In my main I have this select:

SELECT * FROM TABLE WHERE classe LIKE '%OHN%' ;

/* inside the callback */
  bipOrigem = argv[2];
  bipDestino  = argv[3];


UPDATE TABLE SET limiar=limiar+1 WHERE id="argv[0]";

if(bipDestino == objAlerta.ipDestino )  ipD =  true;
if(bipOrigem == objAlerta.ipOrigem ) ipO = true

if(!ipD)
UPDATE TABLE SET classe= "+bipOrigem+" ,"+objAlerta.ipOrigem+ " WHERE
id= " +argv[0]+ " ;
.
.
.
/* end callback */

So Im have to do some UPDATEs, depending the result of the SELECT.

That is what Im trying to do, sorry for not putting the hole
information. And thanks for the patients.

Thiago Mello

Em Sex, 2003-11-07 ās 11:37, Mrs. Brisby escreveu:
> On Sat, 2003-11-08 at 07:20, Thiago Mello wrote:
> > Hi Ben Carlyle, 
> > 
> > First of all, thanks for your help!
> > 
> > I can't brig these two operation togethe causa I need the result of the
> > SELECT in a if condition.
> 
> You cannot do the UPDATE inside of a SELECT callback. You do not need
> the results of a SELECT for an UPDATE. Not for this one.
> 
> I think you mean:
> 
> UPDATE TABLE1 SET number=number+1 WHERE id="JOHN";
> 
> Or maybe you meant:
> 
> UPDATE TABLE1 SET number=number+1 WHERE name="JOHN";
> 
> Either way, it seems an awful like you have a "bigger goal" that you're
> trying to solve that you're not explaining here for whatever reason--
> instead you assumed you needed to UPDATE inside the SELECT. You can't
> and if you show us what you're really trying to do, I'll bet that you
> don't either...



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to