Gossamer Forum
Home : Products : Others : Gossamer Community :

MySQL Update problems

Quote Reply
MySQL Update problems
I have a small problem. I wrote a global that updates a specific field in the table comm_users of Gossamer-Community.
For testing purposes the initial field I used was the comm_email. After testing it over and over to see if it works,
I added a column , comm_points, to the comm_users table. I updated all references from the comm_email field to
the comm_points field. Guess what? It doesn't work Tongue. The field can't be updated for some reason. I changed the refences
to the comm_email field and it worked again. Any hint on what might be the problem?


Sacrifice is not about what you lose,
it is about what you gain in the process.
Quote Reply
Re: [EZFrag] MySQL Update problems In reply to
I just got a thought. Do I need to update the definitions for the database? If so, how do I do it?


Sacrifice is not about what you lose,
it is about what you gain in the process.
Quote Reply
Re: [EZFrag] MySQL Update problems In reply to
Hi,

Did you update the .def file manually?

You need something like this in secure_date/defs/comm_users.def file:

Code:
'comm_points' => {
'default' => '',
'form_display' => 'Points',
'form_size' => '10',
'form_type' => 'TEXT',
'not_null' => '0',
'pos' => '15',
'type' => 'INT',
},

Without this, the new field will just get ignored by GT::SQL when doing updates on the table :)

BTW, I've moved this into the GCommunity forum , as its not really MySQL related =)

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] MySQL Update problems In reply to
Yap, I got it. At just the push of a button.

Thanks Wink


Sacrifice is not about what you lose,
it is about what you gain in the process.