RE: [PHP-DB] Datetime help in an INSERT...
| From: | SBCSI) | Date: | Thu, 05 Jun 2003 14:48:01 +0000 |
| Subject: | RE: [PHP-DB] Datetime help in an INSERT... | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-28354@lists.php.net to get a copy of this message | ||
Not sure exactly how I would implement this. Currently the reload URL
is being provided via the "$PHP_SELF" variable. I like using this, but
suppose I could change this if truly necessary. Also, the $td is not
currently being passed into the function that generates the two buttons and
hence defines the reload URL. I would rather not pass any additional
variables into this function as I just feel this is "unclean". Thanks again
for the idea, and any additional advice or suggestions are most appreciated.
-----Original Message-----
From: Gary.Every@ingramentertainment.com
[mailto:Gary.Every@ingramentertainment.com]
Sent: Thursday, June 05, 2003 9:01 AM
To: NIPP, SCOTT V (SBCSI)
Subject: RE: [PHP-DB] Datetime help in an INSERT...
You could alway place it as a "GET"
echo "<a href=\"yourscript.com/yourpage.php?td=$td\">";
Gary Every
Sr. UNIX Administrator
Ingram Entertainment
(615) 287-4876
"Pay It Forward"
mailto:gary.every@ingramentertainment.com
<mailto:gary.every@ingramentertainment.com>
http://accessingram.com <http://accessingram.com>
> -----Original Message-----
> From: NIPP, SCOTT V (SBCSI) [ mailto:sn4265@sbc.com
<mailto:sn4265@sbc.com> ]
> Sent: Thursday, June 05, 2003 8:57 AM
> To: 'CPT John W. Holmes'; jay@advmed.com
> Cc: php-db@lists.php.net
> Subject: RE: [PHP-DB] Datetime help in an INSERT...
>
>
> I have actually discovered that the $td value is blank.
> The reason
> appears to be that the page is reloading when a button is
> pushed, and that
> is when the $td value is being lost. My question now is, how
> do I keep the
> $td value after the page is reloaded? I would rather keep
> the value from
> the original query than perform another database query to
> populate this
> value yet again. Thanks yet again for the help.
>
> -----Original Message-----
> From: CPT John W. Holmes [ mailto:holmes072000@charter.net
<mailto:holmes072000@charter.net> ]
> Sent: Wednesday, June 04, 2003 2:14 PM
> To: NIPP, SCOTT V (SBCSI); jay@advmed.com
> Cc: php-db@lists.php.net
> Subject: Re: [PHP-DB] Datetime help in an INSERT...
>
>
> > > I am stumbling across something that I thought I have done before,
> > > and I am not having any luck finding an example of this.
> Basically, I
> am
> > > wanting to timestamp the date and time into new entries
> in a simple
> > database
> > > table. The following section is the actual code for
> this, and I cannot
> > > figure out how to get the date/time stamp to populate
> into the database.
> > > Thanks in advance for the help. I suspect this is a very
> simple fix.
> > >
> > > $denylog = "INSERT INTO deny (account, td, date) VALUES
> ($tmp, $td,
> > NOW())";
> > > $denylog_result = mysql_query($denylog, $Prod) or
> die(mysql_error());
> >
> > The error I am receiving is:
> >
> > You have an error in your SQL syntax near ' NOW())' at line 1
>
> Are you sure $td has a value? If it's blank, you'd get an
> error like that.
>
> ---John Holmes...
>
> --
> PHP Database Mailing List ( http://www.php.net/
> <http://www.php.net/> )
> To unsubscribe, visit: http://www.php.net/unsub.php
<http://www.php.net/unsub.php>
>