Zenith
|
| Posted: 04/12/2002, 11:40 AM |
|
Hi, i made a regform with codecharge. But when i insert a hidden field that
should write to the date_created field in the database, i always get
0000-00-00 in the database, and not the actual date. I even tried to use the
date(m,d,y) function in PHP but whatever i do, i cant get the date into the
database. I also tried to give the date_created field in the database text
type instead of date. Its either 0000-00-00, Null, of empty.
(using php,mysql)
What am i doing wrong?
How can i give the date_created field in the form a date value, even when
its hidden?
Is it possible to generate a date into the sql query?
Greetz, Zenith
|
|
|
 |
Richi Novello
|
| Posted: 04/14/2002, 2:08 AM |
|
Form Type: Record
Form event: Before insert
$flddate_created =date("Y-m-d H:i:s");
Enjoy
Richi Novello
"Zenith" <webmaster@countzero.net> ha scritto nel messaggio
news:a979nb$82f$1@news.codecharge.com...
> Hi, i made a regform with codecharge. But when i insert a hidden field
that
> should write to the date_created field in the database, i always get
> 0000-00-00 in the database, and not the actual date. I even tried to use
the
> date(m,d,y) function in PHP but whatever i do, i cant get the date into
the
> database. I also tried to give the date_created field in the database text
> type instead of date. Its either 0000-00-00, Null, of empty.
> (using php,mysql)
>
> What am i doing wrong?
> How can i give the date_created field in the form a date value, even when
> its hidden?
> Is it possible to generate a date into the sql query?
>
> Greetz, Zenith
>
>
|
|
|
 |
Erik Slooff
|
| Posted: 04/14/2002, 11:44 AM |
|
Hi Zenith,
Yes, you could also create the date in your SQL. I'm using mySQL and do the
following as an example:
$sSQL = "update admins set a_lastlogin = now(), a_lastIP = $userIP where
a_gebruikersnaam = $user";
This logs the moment of login in the admins database.
Hope this helps,
Erik
"Richi Novello" <novello.r@libero.it> wrote in message
news:a9bgue$doa$1@news.codecharge.com...
> Form Type: Record
> Form event: Before insert
>
> $flddate_created =date("Y-m-d H:i:s");
>
> Enjoy
> Richi Novello
>
> "Zenith" <webmaster@countzero.net> ha scritto nel messaggio
>news:a979nb$82f$1@news.codecharge.com...
> > Hi, i made a regform with codecharge. But when i insert a hidden field
> that
> > should write to the date_created field in the database, i always get
> > 0000-00-00 in the database, and not the actual date. I even tried to use
> the
> > date(m,d,y) function in PHP but whatever i do, i cant get the date into
> the
> > database. I also tried to give the date_created field in the database
text
> > type instead of date. Its either 0000-00-00, Null, of empty.
> > (using php,mysql)
> >
> > What am i doing wrong?
> > How can i give the date_created field in the form a date value, even
when
> > its hidden?
> > Is it possible to generate a date into the sql query?
> >
> > Greetz, Zenith
> >
> >
>
>
|
|
|
 |
Zenith
|
| Posted: 04/14/2002, 7:13 PM |
|
You have no idea how happy you just made me :)
thanks alot
Grtz, Zenith
"Richi Novello" <novello.r@libero.it> schreef in bericht
news:a9bgue$doa$1@news.codecharge.com...
> Form Type: Record
> Form event: Before insert
>
> $flddate_created =date("Y-m-d H:i:s");
>
> Enjoy
> Richi Novello
>
> "Zenith" <webmaster@countzero.net> ha scritto nel messaggio
>news:a979nb$82f$1@news.codecharge.com...
> > Hi, i made a regform with codecharge. But when i insert a hidden field
> that
> > should write to the date_created field in the database, i always get
> > 0000-00-00 in the database, and not the actual date. I even tried to use
> the
> > date(m,d,y) function in PHP but whatever i do, i cant get the date into
> the
> > database. I also tried to give the date_created field in the database
text
> > type instead of date. Its either 0000-00-00, Null, of empty.
> > (using php,mysql)
> >
> > What am i doing wrong?
> > How can i give the date_created field in the form a date value, even
when
> > its hidden?
> > Is it possible to generate a date into the sql query?
> >
> > Greetz, Zenith
> >
> >
>
>
|
|
|
 |
|