Hi,
Got a bit of a weird bug with GT::SQL.
Here is some example code:
Username => $in->{Their_Username},
URL => $in->{URL},
AccountExpDate => $exp_date,
IsLiveAccount => 1,
PaymentPeriod => $in->{PaymentPeriod},
AutoRecurringEnabled => $in->{AutoRecurringEnabled},
Reseller => $IN->param('Reseller');,
DateCreated => GT::Date::date_get(),
CompanyName => $in->{CompanyName}
}
) || die $GT::SQL::error;
Changing to this code works fine:
$DB->table('DomainAccounts')->add( {
Username => $in->{Their_Username},
URL => $in->{URL},
AccountExpDate => $exp_date,
IsLiveAccount => 1,
PaymentPeriod => $in->{PaymentPeriod},
AutoRecurringEnabled => $in->{AutoRecurringEnabled},
Reseller => $reseller,
DateCreated => GT::Date::date_get(),
CompanyName => $in->{CompanyName}
}
) || die $GT::SQL::error;
Basically, what seems to happen - is after the "Reseller" bit, it was "pushing" all the fields along.
So, instead of being:
DateCreated => 2009-10-12,
CompanyName => something
...it seems to be getting passed in as:
2009-10-12 => CompanyName
something => undef
Now, the only way I can seem to get around this - is by putting the "reseller" into a $reseller variable, and using that instead (rather than $IN)
Is this a bug, and if so - and chance of fixing it? =)
TIA
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Got a bit of a weird bug with GT::SQL.
Here is some example code:
Code:
$DB->table('DomainAccounts')->add( { Username => $in->{Their_Username},
URL => $in->{URL},
AccountExpDate => $exp_date,
IsLiveAccount => 1,
PaymentPeriod => $in->{PaymentPeriod},
AutoRecurringEnabled => $in->{AutoRecurringEnabled},
Reseller => $IN->param('Reseller');,
DateCreated => GT::Date::date_get(),
CompanyName => $in->{CompanyName}
}
) || die $GT::SQL::error;
Changing to this code works fine:
Code:
my $reseller = $IN->param('Reseller'); $DB->table('DomainAccounts')->add( {
Username => $in->{Their_Username},
URL => $in->{URL},
AccountExpDate => $exp_date,
IsLiveAccount => 1,
PaymentPeriod => $in->{PaymentPeriod},
AutoRecurringEnabled => $in->{AutoRecurringEnabled},
Reseller => $reseller,
DateCreated => GT::Date::date_get(),
CompanyName => $in->{CompanyName}
}
) || die $GT::SQL::error;
Basically, what seems to happen - is after the "Reseller" bit, it was "pushing" all the fields along.
So, instead of being:
Code:
Reseller => xxxx, DateCreated => 2009-10-12,
CompanyName => something
...it seems to be getting passed in as:
Code:
Reseller => DateCreated 2009-10-12 => CompanyName
something => undef
Now, the only way I can seem to get around this - is by putting the "reseller" into a $reseller variable, and using that instead (rather than $IN)
Is this a bug, and if so - and chance of fixing it? =)
TIA
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!