Home : Products : Gossamer Links : Development, Plugins and Globals :

Products: Gossamer Links: Development, Plugins and Globals: Re: [Andy.] Can you use an UPDATE in a global?: Edit Log

Here is the list of edits for this post
Re: [Andy.] Can you use an UPDATE in a global?

I suppose you can do UPDATE in globals, too, as any other sql queries.
I'll check the GT::SQL docs and I will be back in a few minutes.
Back now.

The GT::SQL::Table module docs says:
$obj->update ( { Setme => 'NewValue'}, { WhereCol => 5 });
would set the column 'Setme' to 'NewValue' where the column 'WhereCol' is 5.

This translates to:
UPDATE Table SET SetMe='NewValue' WHERE WhereCol = 5

As queries are possible in globals, I suppose update is also possible.
As for the CPU usage/performance: its up to you to do updates 100K times a day, but you know how busy is your site, how much data you update in a step of a global call, and if your server would be able to serve so much updates.
My personal opinion is 100K updates a day is not too much for a MySQL server, but depends how strong is your server and how much update you do in a step.

Best regards,

Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...

Last edited by:

webmaster33: Apr 29, 2002, 12:12 PM

Edit Log: