Hello,

This is a really simple (looking) problem, but I can't seem to find the solution 
in the documentation.  I want to insert today's date into a MySQL Date field.

My first attempt was to use the following:

$insert = mysql_query("insert into dbrss (Feed, Title, URL, Abstract, Old) 
VALUES ('$Feed','$Title','$URL',NOW(),'",$db);

The relevant table was created with the following:

CREATE TABLE dbrss (
    ID int(7) NOT NULL auto_increment,
    Feed varchar(50) NOT NULL,
    Title varchar(255) NOT NULL,
    URL varchar(255) NOT NULL,
    Abstract varchar(255),
    superRSS varchar(50),
    Type varchar(50),
    Old date,
    Source varchar(100),
    SourceURL varchar(100),
    PRIMARY KEY (ID)
);

I also tried to insert a date generated by:
$Date = date(Y-m-d);

using the following variation:

$insert = mysql_query("insert into dbrss (Feed, Title, URL, Abstract, Old) 
VALUES ('$Feed','$Title','$URL','$Date','",$db);

Any help would be appreciated.

Mike
-- 
Mike Gifford, OpenConcept Consulting, http://openconcept.ca
Offering everything your organization needs for an effective web site.
Featured Client: http://halifaxinitiative.org
A good life is one inspired by love and guided by knowledge - B. Russell


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to