Gossamer Forum
Quote Reply
Defying Logic!
Can someone PLEASE tell me why the following code;

Code:
# now we need to add it to the database...
my $database_connection = $DB->table("News");
$database_connection->add ( { title => $full_title,
short => $short_article,
full_article => $article,
date => $date_added,
nice_date => $todays_date
} ) or die ("Unable to add article. Reason: $GT::SQL::error");

returns the error;

A fatal error has occured:

Unable to add article. Reason: Column full cannot be left blank. at /www/site.com/cgi-bin/directory/admin/Plugins/Check.pm line 153.

Please enable debugging in setup for more details.

Its telling me I need to fill in the 'full' column, but I've double, tripple, and quadrouply checked the code, to make sure its not calling 'full' to add to, and I've also checked the table to see if there is even a 'full' column, which there isn't!!!!

This is driving me crazy! Crazy

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!
Quote Reply
Re: [Andy] Defying Logic! In reply to
The 'full' the error message is referring to is the 'Form Display' of the actual column name. Maybe your column 'full_article' has the 'Form Display' set to 'full'?

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Defying Logic! In reply to
LOL @ Me Tongue

Buit, I tried printing out;

print $article;

...just above the 'add' statement, and it prints out the value that is mean to be for it. I even tried quoting;

full_article => "$article",

Weird.

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!
Quote Reply
Re: [Andy] Defying Logic! In reply to
This is what I have in Install.pm;

Code:
full_article => {
pos => 3,
type => 'CHAR',
not_null => 1
},

I don't see any real reference to 'full' there Unsure

I've also done a print out of all the variables that are being used in the above command, anbd it returned this;

Quote:
title => ergertgegegege,
short => egegergergegeger,
full_article => "gegetgetnetertertertn",
date => 1036596970,
nice_date => 06-11-2002

Its very weird, cos all the fields are complete! Crazy

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!

Last edited by:

Andy: Nov 6, 2002, 7:42 AM
Quote Reply
Re: [Andy] Defying Logic! In reply to
Try replacing "date" with something else. That might be a problem because it's a mysql reserved word (or something along those lines).

Ivan
-----
Iyengar Yoga Resources / GT Plugins