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

forum_User table not updating

Quote Reply
forum_User table not updating
Hi there,

I am trying to update data in the forum_User table.
Here is the script I am using (it is called via AJAX, the script is located in /home/mw/mywebsite.com/cgi-bin/forum):

Code:
#!/usr/bin/perl -w

use CGI;
use strict;
my $query = new CGI;
my $func = $query->param('func');

if($func eq "llUpd"){

my $user = $query->param('id');
my $lat = $query->param('lat');
my $lng = $query->param('lng');
my $result;
use lib '/home/mw/mywebsite.com/cgi-bin/forum/admin';
use GForum qw/$DB/;

GForum::init('/home/mw/mywebsite.com/cgi-bin/forum/admin');

my $user_table = $DB->table('User');
$result = $user_table->update({ user_latitude => $lat, user_longitude => $lng }, { user_username => $user });

if($result)
{

print $query->header;
print "$result lat:$lat lng:$lng";
}
else
{

print $query->header;
print "Update failed.";

}
}

The if statement evaluates true and the result of the print in the true branch is

Code:

GT::SQL::Driver::MYSQL::sth=HASH(0xa0b1d60) lat:-29.535229562948455 lng:27.421875

It seems to work, but the columns in the table isn't being updated. Thanks for the help Wink


Sacrifice is not about what you lose,
it is about what you gain in the process.
Subject Author Views Date
Thread forum_User table not updating EZFrag 2673 Apr 1, 2008, 2:29 AM
Post Re: [EZFrag] forum_User table not updating
Andy 2611 Apr 1, 2008, 3:12 AM
Thread Re: [EZFrag] forum_User table not updating
Andy 2633 Apr 1, 2008, 3:13 AM
Thread Re: [Andy] forum_User table not updating
EZFrag 2608 Apr 1, 2008, 3:33 AM
Post Re: [EZFrag] forum_User table not updating
Andy 2597 Apr 1, 2008, 3:38 AM