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

Update... why this error though? :/

Quote Reply
Update... why this error though? :/
Hi guys/gals,

I'm using the following line in one of my scripts;

$DB->table('Links')->update( { 'BeenChecked' => '1' } , { 'ID' => $hit->{ID} } ) || die $GT::SQL::error . $DB->query_stack_disp;

However, I keep getting the following error;

Quote:
<p><font face='Tahoma,Arial,Helvetica' size=2>A fatal error has occured:</font><
/p><blockquote><pre>The column 'LinkID' must be unique, and already has an entry
'145' at update.pl line 42.
</pre></blockquote><p><font face='Tahoma,Arial,Helvetica' size=2>Please enable d
ebugging in setup for more details.</font></p>
The column 'LinkID' must be unique, and already has an entry '145' at update.pl
line 42.

However, 145 is the LINK ID, and not the value that is meant to be set for "BeenChecked".

Basically, the query should look something like;

UPDATE lsql_Links SET BeenChecked = '1' WHERE ID = '145';

... but it looks more like its being structured as;

UPDATE lsql_Links SET ID = '145' WHERE BeenChecked = '1' ;

Anyone got any ideas? Unimpressed

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!
Subject Author Views Date
Thread Update... why this error though? :/ Andy 3211 Feb 1, 2005, 7:13 AM
Thread Re: [Andy] Update... why this error though? :/
Andy 3113 Feb 1, 2005, 8:17 AM
Thread Re: [Andy] Update... why this error though? :/
Andy 3069 Feb 7, 2005, 2:25 AM
Thread Re: [Andy] Update... why this error though? :/
Andy 3004 Mar 16, 2005, 8:18 AM
Thread Re: [Andy] Update... why this error though? :/
webmaster33 3050 Mar 16, 2005, 8:36 AM
Post Re: [webmaster33] Update... why this error though? :/
Andy 3000 Mar 16, 2005, 8:48 AM
Thread Re: [webmaster33] Update... why this error though? :/
Andy 3051 Mar 16, 2005, 8:50 AM
Thread Re: [Andy] Update... why this error though? :/
webmaster33 3011 Mar 16, 2005, 9:46 AM
Post Re: [webmaster33] Update... why this error though? :/
Andy 2996 Mar 16, 2005, 10:49 AM