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

No error, but it doesn't add?

Quote Reply
No error, but it doesn't add?
Hi. I'm facing a bit of a dilema here. For some reason, my code will not insert the value into the 'Image' field. In lsql_News.def I have;

Code:
{
'cols' => {
'AccessString' => {
'form_size' => '10',
'form_type' => 'TEXT',
'not_null' => '1',
'pos' => '1',
'size' => '20',
'type' => 'TEXT'
},
'Title' => {
'form_size' => '10',
'form_type' => 'TEXT',
'not_null' => '1',
'pos' => '1',
'size' => '20',
'type' => 'TEXT'
},
'Date' => {
'form_size' => '10',
'form_type' => 'TEXT',
'not_null' => '1',
'pos' => '1',
'size' => '20',
'type' => 'TEXT'
},
'Author' => {
'form_size' => '10',
'form_type' => 'TEXT',
'not_null' => '1',
'pos' => '1',
'size' => '20',
'type' => 'TEXT'
},
'Article' => {
'form_size' => '10',
'form_type' => 'TEXTAREA',
'not_null' => '1',
'pos' => '1',
'size' => '20,20',
'type' => 'TEXT'
},
'Category' => {
'form_size' => '10',
'form_type' => 'TEXT',
'not_null' => '1',
'pos' => '1',
'size' => '20',
'type' => 'TEXT'
},
'Image' => {
'form_size' => '10',
'form_type' => 'TEXT',
'not_null' => '0',
'pos' => '1',
'size' => '20',
'type' => 'TEXT'
},
'Stamp' => {
'form_size' => '10',
'form_type' => 'TEXT',
'not_null' => '0',
'pos' => '1',
'size' => '20',
'type' => 'TEXT'
}

},
'fk' => {},
'fk_tables' => [],
'index' => {},
'pk' => [],
'subclass' => {},
'unique' => {}
};


...and the code I'm having the problem with is;

Code:
my $table = $DB->table("News");
$table->add ( { AccessString => "$AccessString",
Title => "$title",
Date => "$new_date",
Author => "$copyright",
Article => "$article",
Category => "$cat_do",
Image => $url_image,
Stamp => \"NOW()",

} ) or print "$GT::SQL::error"; #

I'm totally stumped. If I look at the query that is executed, it looks something like;

INSERT INTO lsql_News (Title,Author,Date,Stamp,AccessString,Article,Category) VALUES (?,?,?,NOW(),?,?,?)

Note that the 'Image' field is missing.

hAs anyone seen this before? When I was developing my PPC Plugin I had a problem like this, but it was fixed by editing the .def file. That fix doesn't seem to work in this case Unsure

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!
Subject Author Views Date
Thread No error, but it doesn't add? Andy 1499 May 8, 2003, 2:11 AM
Thread Re: [Andy] No error, but it doesn't add?
Paul 1464 May 8, 2003, 2:37 AM
Post Re: [Paul] No error, but it doesn't add?
Andy 1458 May 8, 2003, 2:55 AM
Post Re: [Paul] No error, but it doesn't add?
Andy 1455 May 8, 2003, 3:11 AM