Please...can anyone see why this won't work?
For some reason, the query always comes out like;
SELECT * FROM links2CatAdverts WHERE SetID = 3 AND Password = magnum
Notice the lack of quotes around the Password = value part. This seems to be causing an error. See below;
GT::SQL::error = Failed to execute query: 'SELECT * FROM links2CatAdverts WHERE SetID = 3 AND Password = magnum ' Reason: Unknown column 'magnum' in 'where clause'
I've tried several versions of the code, such as;
my $sth = $table->select( { SetID => \$ID, Password => \$Password } );
my $sth = $table->select( { SetID => \$ID, Password => \'$Password' } );
...and thats about it
Anyone got any ideas? This one really has me stumped.
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 | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Code:
my $sth = $table->select( { SetID => \$ID, Password => "$Password" } );For some reason, the query always comes out like;
SELECT * FROM links2CatAdverts WHERE SetID = 3 AND Password = magnum
Notice the lack of quotes around the Password = value part. This seems to be causing an error. See below;
GT::SQL::error = Failed to execute query: 'SELECT * FROM links2CatAdverts WHERE SetID = 3 AND Password = magnum ' Reason: Unknown column 'magnum' in 'where clause'
I've tried several versions of the code, such as;
Code:
my $sth = $table->select( { SetID => \$ID, Password => \"$Password" } ); my $sth = $table->select( { SetID => \$ID, Password => \$Password } );
my $sth = $table->select( { SetID => \$ID, Password => \'$Password' } );
...and thats about it

Anyone got any ideas? This one really has me stumped.
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 | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!