Prafulla,
please check documentation http://www.mysql.com/doc/en/DATETIME.html
...
The TIMESTAMP column type provides a type that you can use to automatically
mark INSERT or UPDATE operations with the current date and time. If you have
multiple TIMESTAMP columns, only the first one is updated
Prafulla,
Tuesday, September 17, 2002, 2:12:58 PM, you wrote:
PG Following is the description of the problem being faced.
PG Problem:
PG The first timestamp column in a table is set to current date-time value as soon as
we update one or more columns in the table.
It's a normal behaviour
Hello. I have a problem where TIMESTAMP comparison fails on MySQL 3.23.52 on
RedHat 7.3.
I have installed the RPMS that came with the distro as well as the ones from
the mysql.com site. The results are the same:
mysql select TIMESTAMP from tblPositions;
++
| TIMESTAMP
Hello all,
suppose I have added one field time_stamp of type
timestamp in any existing table. it will show the
current timestamp of all records. If i update any
record after sometime It will also update the
timestamp of updated record with current timestamp.
but for insertion of any record
Hi Jenny,
I believe that the timestamp field will automatically be set to NOW()
when you INSERT a record... In other words, you can disregard the
timestamp field in the INSERT query
Peter Normann
-Original Message-
From: Jenny Christy [mailto:[EMAIL PROTECTED]]
Sent: 30. juli
jenny
suppose I have added one field time_stamp of type
timestamp in any existing table. it will show the
current timestamp of all records. If i update any
record after sometime It will also update the
timestamp of updated record with current timestamp.
but for insertion of any record
suppose I have added one field time_stamp of type
timestamp in any existing table. it will show the
current timestamp of all records. If i update any
record after sometime It will also update the
timestamp of updated record with current timestamp.
but for insertion of any record...what i
btw folks, not wanting but already hijaking the thread:
I have a table with one timestamp(14) column and several other varchar(5)
columns. How do I select rows from that table using two strings formated as
MMDDhhmmss and using SQLBindParameter? I´m more interested in how
setup
Hi Jenny,
The formatting are the same -MM-DD HH: -
The timestamp field is set automatic by the system when updating a record.
The date/time fields are for Your control and usage.
Take a look in the manual 6.2.2.2 The DATETIME, DATE, and TIMESTAMP Types
Best regards
Peter
Hello All,
I m using mysql 3.23.42 and myodbc 3.51 on linux7.2.
I use SQLDescribeCol API to get type of column(field).
When i call above functuon it returns type of datetime
and timestamp is 93 for both. but the format of
inserting datetime value uses ( )and timesstamp
value is different.
I m
Hello All,
I m using mysql 3.23.42 and myodbc 3.51 on linux7.2.
I use SQLDescribeCol API to get type of column(field).
When i call above functuon it returns type of datetime
and timestamp is 93 for both. but the format of
inserting using sql query, datetime value uses (
)and timesstamp value
What error? What schema?
Try TIMESTAMP(14)
Pat...
- Original Message -
From: Todd Cary [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, July 14, 2002 11:31 PM
Subject: ODBC and TimeStamp
I have a MySQL TimeStamp in my table. If I try to do a query via ODBC, I
get an
error
Patrick -
I have the following Sql SELECT statement:
SELECT FirstName, LastName, ChangeTime FROM Members;
If I execute the statement using ADO (uses a ODBC connection), the result set is
empty. When the ChangeTime is removed, I get a result set.
Todd
--
Todd Cary
Ariste Software
2200 D
[snip]
I have the following Sql SELECT statement:
SELECT FirstName, LastName, ChangeTime FROM Members;
If I execute the statement using ADO (uses a ODBC connection), the result
set is
empty. When the ChangeTime is removed, I get a result set.
[/snip]
Can you show us a DESCRIBE TABLE for
) default NULL,
MEM_CHANGE_DATE timestamp(14) NOT NULL, problem
MEM_UP_FNAME varchar(30) default NULL,
MEM_UP_LNAME varchar(30) default NULL,
MEM_PW_CHG char(1) default 'N',
PRIMARY KEY (MEM_NUM),
KEY IDX_MEM_FNAME (MEM_FIRSTNAME),
KEY IDX_MEM_LNAME (MEM_LASTNAME),
KEY IDX_MEM_NUM
I believe the timestamp field needs to be nullable, but you shouldn't have
any issue selecting a char. Can you run the query from mysql interface? If
you can, than I would suspect that ADO is the culprit, try using straight
ODBC instead.
I hope this helps...
Pat...
- Original Message
Can you run the query from mysql interface?
Yes.
Todd
--
Todd Cary
Ariste Software
2200 D Street Extension
Petaluma, CA 94952
707-773-4523
[EMAIL PROTECTED]
-
Before posting, please check:
I have a MySQL TimeStamp in my table. If I try to do a query via ODBC, I get an
error on the field.
Any suggestions?
Todd
--
Todd Cary
Ariste Software
2200 D Street Extension
Petaluma, CA 94952
707-773-4523
[EMAIL PROTECTED
Hi,
I´ve emailed the list but my problem doesnt seem to have catch much
attention. I guess a re-phrasing might help.. It´s pretty
simple (I´m using myODBC 3.51 and VC++ 6.0 ) : how do I declare and bind
variables/parameters for a TIMESTAMP column?
Here´s what I´ve done so far: I declare my
= ? AND date_time = ? ) ORDER BY
date_time
It´s prepared execution, and both ? are supposed to be dates, whatever
format. date_time is a timestamp(14) column. I tried to bind the ?´s to
variables like starttime (and endtime) below, which are taken from
CString´s in the convenient format -MM-DD
Heey Folks,
I'm having a slight problem with the timestamp column format. When I alter a
table and, add a column of type timestamp all records get the current
timestamp, that's ok. When i insert a new row, all records get the current
timestamp. That too is ok. But now, when I update one row
The first timestamp in any table is automatically updated by mysql every time you
modify that record. It is the modify timestamp
If you wish to use the timestamp in your table, you should create two timestamps at
least and use the second one
Modstamp timestamp
Usable timestamp
See here http
Wouter,
Friday, June 14, 2002, 4:53:20 PM, you wrote:
WvV I'm having a slight problem with the timestamp column format. When I alter a
WvV table and, add a column of type timestamp all records get the current
WvV timestamp, that's ok. When i insert a new row, all records get the current
WvV
This is exactly what timestamp columns are supposed to do - see
http://www.mysql.com/doc/D/A/DATETIME.html
The first timestamp column in the table will be automatically updated
upon insert/update. Your choices are:
(1) Change to datetime type. Then, on insert, insert the current date
: timestamp problem ..
The first timestamp in any table is automatically updated by mysql every
time you modify that record. It is the modify timestamp
If you wish to use the timestamp in your table, you should create two
timestamps at least and use the second one
Modstamp timestamp
Usable timestamp
r,
Thursday, May 30, 2002, 12:35:58 PM, you wrote:
r in a timestamp field, do I have to provide the values?
r eg
r create table ryan(t_imestamp timestamp(8), name varchar(30));
r how do I insert? do I have to specify the value? if so how do I get the
r value to specify it?
r The manual
Greetings guys,
Special greetings to all of you who helped me in the last question, one
last
one
in a timestamp field, do I have to provide the values?
eg
create table ryan(t_imestamp timestamp(8), name varchar(30));
how do I insert? do I have to specify the value? if so how do I
try timestamp(14) instead.
[EMAIL PROTECTED] wrote:
Description:
Problem with timestamp(8) and GROUP BY
How-To-Repeat:
mysql CREATE TABLE test (
- id int auto_increment,
- dd timestamp(8),
- data int,
- PRIMARY KEY (id)
- );
Query OK, 0 rows affected (0.01 sec
sitnikov,
Monday, May 27, 2002, 10:32:07 PM, you wrote:
s Description:
s Problem with timestamp(8) and GROUP BY
s How-To-Repeat:
mysql CREATE TABLE test (
s - id int auto_increment,
s - dd timestamp(8),
s - data int,
s - PRIMARY KEY (id)
s - );
s Query OK, 0 rows
|
+--+--+
4 rows in set (0.00 sec)
The 8 in timestamp(8) affects only the display. The other digits are
still there internally, so the values are still distinct when you
attempt to group them. Perhaps what you want is something like
SELECT LEFT(dd, 8), COUNT(*) GROUP BY LEFT(dd, 8);
Also
Description:
Problem with timestamp(8) and GROUP BY
How-To-Repeat:
mysql CREATE TABLE test (
- id int auto_increment,
- dd timestamp(8),
- data int,
- PRIMARY KEY (id)
- );
Query OK, 0 rows affected (0.01 sec)
mysql INSERT INTO test (data) VALUES(1),(2),(3),(4
Description:
Given a table that has a timestamp field which is either the primary key or
one field in a multi-column primary key, the value in this field is
updated to the current time any time an SQL UPDATE is done, even
when the timestamp field is not intended
The is the proper, documented functionality of the timestamp field. An
exerpt from http://www.mysql.com/doc/D/A/DATETIME.html is below:
The TIMESTAMP column type provides a type that you can use to automatically
mark INSERT or UPDATE operations with the current date and time. If you have
Is it possible to alter or modify a timestamp field to a different date?
--
---
Alex Pilson
FlagShip Interactive, Inc.
[EMAIL PROTECTED]
404.728.4417
404.642.8225 CELL
// Web Design
// Lasso 5 Web Development
Hello.
On Mon, May 20, 2002 at 03:22:12PM -0400, [EMAIL PROTECTED] wrote:
Is it possible to alter or modify a timestamp field to a different date?
Yes.
Bye,
Benjamin.
PS: If you expected a different answer, you may want to consider to
elaborate a bit.
--
[EMAIL PROTECTED
At 3:22 PM -0400 5/20/02, Alex Pilson wrote:
Is it possible to alter or modify a timestamp field to a different date?
Doh. I found the answer...
The answer is yes.
--
---
Alex Pilson
FlagShip Interactive, Inc.
[EMAIL
On 15 Apr 2002, at 15:34, Carl McNamee wrote:
We are attempting to put records into a table using the load data or
mysqlimport commands. One quirk is with columns that include a timestamp
type. When we import the records we get zeros in the timestamp column. How
can we get the current
Carl,
Monday, April 15, 2002, 11:34:09 PM, you wrote:
CM We are attempting to put records into a table using the load data or
CM mysqlimport commands. One quirk is with columns that include a timestamp
CM type. When we import the records we get zeros in the timestamp column. How
CM can we get
We are attempting to put records into a table using the load data or
mysqlimport commands. One quirk is with columns that include a timestamp
type. When we import the records we get zeros in the timestamp column. How
can we get the current time inserted when using the load data or
mysqlimport
On Tue, 9 Apr 2002, David BORDAS wrote:
Sent: Tuesday, April 09, 2002 2:14 PM
Subject: Re: TIMESTAMP(14) or Bigint ??
TIMESTAMP is 4 Bytes and DATETIME is 8 Bytes. So, 4 Bytes difference
per 5 Millions records = a 20 MB bigger table ...
David
If storage space is an issue you may want
i can.
So, for this new field that i'll insert and update manually, should i use a
Bigint which required 8 Bytes or a Timestamp(14) with 4 Bytes ?
Timestamp looks great but, can i insert and update it manually ??
Thanks
David
Sent: Tuesday, April 09, 2002 2:14 PM
Subject: Re: TIMESTAMP(14) or Bigint ??
David,
I could be wrong but since bigint isn't a date or time oriented data
type I imagine this would be completely useless to you unless you are
storing unix timestamps.
In fact i'm looking to a way to store
Sent: Tuesday, April 09, 2002 2:14 PM
Subject: Re: TIMESTAMP(14) or Bigint ??
David,
I could be wrong but since bigint isn't a date or time oriented data
type I imagine this would be completely useless to you unless you are
storing unix timestamps.
In fact i'm looking to a way to store
I have created a table with a Primary Key that is an auto_incrementing
field. I was able to receive the auto_increment values by issuing a
last_insert_id(). When I added a timestamp to this table, the
last_insert_id() no longer returned any value except 0.
Is there a MySQL rule that you can
At 14:54 -0500 3/25/02, Eric Baines wrote:
I have created a table with a Primary Key that is an auto_incrementing
field. I was able to receive the auto_increment values by issuing a
last_insert_id(). When I added a timestamp to this table, the
last_insert_id() no longer returned any value
and
TimeStamp Fields
will go through. However, you should
first review the text of the message to make sure it has something to do
with MySQL. Just typing the word MySQL once will be sufficient, for example.
You have written the following:
Hi,
Field1 (varchar) , Field 2 (timestamp) .
I want to do :
select count
Hi!!
You can try
select format_date(field2, '%m %d %Y)as timestamp, count(*), field1 from mad
group by field1
all the best,
Jayasimhan A
- Original Message -
From: cristian ditoiu [EMAIL PROTECTED]
To: mysql [EMAIL PROTECTED]
Sent: Friday, March 22, 2002 1:20 PM
Subject: group
I have MySql database containing a table mad by several fields among wich :
Field1 (varchar) , Field 2 (timestamp) .
I want to do :
select count(*) , field1 , group by field1 .
That's ok , but i'd like to get results like :
2002-01-01 3
2002-01-02 4
.
How can i do that considering
Hi everybody!
I have found following 'bug' in type TIMESTAMP:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1279 to server version: 3.23.48-Max-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql
Create a table
/A/DATETIME.html
In short: the first timestamp field of a table is automatically updated when
the row is updated/inserted.
--
Roger
query
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http
What's the best way to timestamp records if records are to be exported and
then re-imported to another web server in a different time zone? Data will
be exported as comma delimited data. All of the combined records should
reflect the same instant in time, and not have the web site
Brent,
What's the best way to timestamp records if records are to be exported
and
then re-imported to another web server in a different time zone? Data
will
be exported as comma delimited data. All of the combined records
should
reflect the same instant in time, and not have the web site
Two more possibilities:
1. Set your MySQL server to use GMT for everything (that is, in the
OS, not in MySQL).
2. Store all times as Unix time (seconds since 1970) -- the
UNIX_TIMESTAMP() function can be useful for this.
Either solution still has the problem of converting to another
Hi,
small problem. I have a table set up like so. It has a number of entries
that were added on a certain date, I use TIMESTAMP to keep track of the date.
+-+---+--+-+-+--
--+
| Field | Type | Null | Key
[EMAIL PROTECTED] wrote:
Hi,
small problem. I have a table set up like so. It has a number of entries
that were added on a certain date, I use TIMESTAMP to keep track of the date.
+-+---+--+-+-+--
--+
| Field
of sync from ad hoc update queries).
- Original Message -
From: [EMAIL PROTECTED]
To: Douglas Forrest [EMAIL PROTECTED]
Sent: Wednesday, March 06, 2002 7:54 AM
Subject: Re: TIMESTAMP not acting as I'd like
At 07:43 06/03/2002 -0500, you wrote:
Thanks, I think I am complicating things too
rob,
Wednesday, March 06, 2002, 2:19:01 PM, you wrote:
recu small problem. I have a table set up like so. It has a number of entries
recu that were added on a certain date, I use TIMESTAMP to keep track of the date.
recu
Victoria Reznichenko wrote:
recu small problem. I have a table set up like so. It has a number of entries
recu that were added on a certain date, I use TIMESTAMP to keep track of the date.
recu mysql UPDATE deerfield SET version = '2.1' WHERE product = 'WinGate LITE';
recu and all
With MySQL 3.23.38:
If you have a TIMESTAMP column with zero values, then
SELECT ts from table;
returns
00
But
SELECT min(ts) from table;
returns
0
This causes the JDBC driver to fall over when getting the timestamp value
from this query. Isn't this a formatting
I have tried to create a MySQL table with the following lines:
$query[] = CREATE TABLE member (
IDbigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,
userName varchar(40) NOT NULL,
.
.
.
RecordCreationTime TIMESTAMP NOT NULL DEFAULT '0',
LastLoginTIMESTAMP NOT NULL
At 14:31 -0800 2/26/02, John D. Kirkpatrick wrote:
I have tried to create a MySQL table with the following lines:
$query[] = CREATE TABLE member (
IDbigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,
userName varchar(40) NOT NULL,
.
.
.
RecordCreationTime TIMESTAMP NOT NULL
I've added a timestamp field to a table and when viewing the data stored in the field
it looks like this .
19970523091528
.. but when I view the data in Access or Macromedia Dreamweaver it looks like this
05/23/1997 09:15:28
.. is there any way to make Access/Dreamweaver
Clive,
I've added a timestamp field to a table and when viewing the data stored in the field
it looks like this .
19970523091528
.. but when I view the data in Access or Macromedia Dreamweaver it looks like this
05/23/1997 09:15:28
.. is there any way to make Access
Apart from timestamp are there any other fields that will automatically generate data
for themselves when a new record is created ?.
I'm having trouble using timestamp with Macromdia Dreamweaver so something that just
generates a unique number for each record would be good e.g 1,2,3,4,5,6,7
Clive,
Thursday, February 21, 2002, 3:22:47 PM, you wrote:
CA Apart from timestamp are there any other fields that will
CA automatically generate data for themselves when a new record is
CA created ?.
CA I'm having trouble using timestamp with Macromdia Dreamweaver so
CA something that just
Hi all,
If one uses the timestamp data type for a column inside a table, when
executing an update query on said table on a spesific record, will the
timestamp column be updated as well or will it retain its first value?
Thanks for any info in advance,
George
mysql, query, sql
timestamp is automatically updated
-Original Message-
From: George Labuschagne [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 1:20 PM
To: [EMAIL PROTECTED]
Subject: When does the timestamp field gets updated?
Hi all,
If one uses the timestamp data type for a column inside
Only the first TIMESTAMP field gets updated when an updat to a record is
made, so if you want to maintain the time a record was created, and when it
was updated, use two timestamp fields, the first field will be the time
updated, but to do this you must initialize the second timestamp field
George/Rick, a quick addition.
It is not clear from the question: do you want to have the timestamp updated, or do
you want to leave it be?
RTFM:
6.2.2.2 The DATETIME, DATE, and TIMESTAMP Types
...
The TIMESTAMP column type provides a type that you can use to automatically mark
INSERT
Description:
Update of one timestamp field in a table can lead to other timestamp fields
being updated in error.
Run the script below. On my 3.23.48 system the output is
gavin@chip : ./show_bug
mysqladmin Ver 8.23 Distrib 3.23.48, for -freebsd4.5 on i386
FreeBSD chip.gav.itworks.com.au 4.5
I have a table which constantly grows. In selects I need only the
(chronologically) last inserted x rows.
The solution ORDER by timestamp DESC LIMIT x is a poor solution, since it is
an O(n) case for the DBMS.
Is there an elegant (probably mysql-proprietary) SQL-solution for this ?
My solution
webmaster,
Friday, January 25, 2002, 8:45:10 PM, you wrote:
w I have a question which just may very well be ridiculous. In one table,
w we have a column of type timestamp. In normal cases, we want any changes
w to this row to update this timestamp (hence the nature of this datatype).
w
Hello all,
I have a question which just may very well be ridiculous. In one table,
we have a column of type timestamp. In normal cases, we want any changes
to this row to update this timestamp (hence the nature of this datatype).
However, there is one case where we do NOT want the timestamp
At 13:45 -0500 1/25/02, [EMAIL PROTECTED] wrote:
Hello all,
I have a question which just may very well be ridiculous. In one table,
we have a column of type timestamp. In normal cases, we want any changes
to this row to update this timestamp (hence the nature of this datatype).
However
Hi,
My table has 3 columns: id, name, timestamp.
When I use the MySQL command line client,
(a) insert into table values(1,'xxx') fails for insufficient number of
values.
(b) insert into table values(1,'xxx',null) succeeds.
1. The MySQL manual states that The column
* Osnat Rabi
My table has 3 columns: id, name, timestamp.
When I use the MySQL command line client,
(a) insert into table values(1,'xxx') fails for
insufficient number of values.
I don't know if this will help you, but this is valid:
insert into table set id=1, name='xxx
There seems to be a flaw in the myODBC driver
02.50 when working with the Unix-Timestamp()
function.
Apparently, the driver doesn't know which
data-type to use...
When I send the sql statement:
--
Select
( UNIX_TIMESTAMP(U.lastTime
My timestamp is doing the same thing... with inserting 0's ... but if I
leave it out of the insert query, it wont update, because the field is
missing... I have the insert and also a mail() function that lets me
know every time an entry has been made, and when I first tried the
timestamp, it just
Hi,
I have run the small test below:
mysql create table test (
- f1 int,
- ts timestamp);
Query OK, 0 rows affected (0.40 sec)
mysql insert into test values (10);
ERROR 1136: Column count doesn't match value count at row 1
mysql insert into test (f1) values (10);
Query OK, 1 row
that does the trick.
My guess is that the ODBC driver is
behaving badly in this case ...
Cheers,
bart
Van: Bart Goormans
Verzonden: zondag 16 december 2001 9:21
There seems to be a flaw in the myODBC driver
02.50 when working with the Unix-Timestamp()
function.
Apparently, the driver
Is there a way that will allow a mysql database automatically add the
current timestamp to a record when the record is added to the database?
Would formatting it through php be useful, and if so, does anyone know how?
Thanks,
Steve Osborne
Database Programmer
Chinook Multimedia Inc.
[EMAIL
You've answered your own question.
Just add a field of type TIMESTAMP to your record. Whenever the field is
added or updated, this field will be updated as well.
-Original Message-
From: Steve Osborne [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 14, 2001 12:48 PM
To: MySQL (E-mail
Rick,
snip
Just add a field of type TIMESTAMP to your record. Whenever the field is
added or updated, this field will be updated as well.
/snip
The field is already a 'timestamp(14)' type field, but all that is being
stored in the fields are zero's.
Do you know what could
Steve Osborne wrote:
Rick,
snip
Just add a field of type TIMESTAMP to your record. Whenever the field is
added or updated, this field will be updated as well.
/snip
The field is already a 'timestamp(14)' type field, but all that is being
stored in the fields are zero's
How are you storing data to the record? It should be:
CREATE TABLE mytable (
mydata int NOT NULL,
timestamp timestamp
);
INSERT INTO mytable VALUES(123,NULL);
UPDATE mytable SET mydata=456;
-Original Message-
From: Steve Osborne [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 14
:
Rick,
snip
Just add a field of type TIMESTAMP to your record. Whenever the field
is
added or updated, this field will be updated as well.
/snip
The field is already a 'timestamp(14)' type field, but all that is
being
stored in the fields are zero's.
Do you know
Timestamp additional info:
INSERT INTO Owners (NameID,ProductsKey,RegNum,ProdRegDate)
VALUES ('$NameID','1','$RegNumc','NULL');
ProdRegDate is the field that I want to timestamp. (Again, I've tried
passing '', NULL, and 'NULL').
Steve Osborne
Database Programmer
Chinook Multimedia Inc.
[EMAIL
mysql (filter)
Timestamp additional info:
INSERT INTO Owners (NameID,ProductsKey,RegNum,ProdRegDate)
VALUES ('$NameID','1','$RegNumc','NULL');
ProdRegDate is the field that I want to timestamp. (Again, I've tried
passing '', NULL, and 'NULL').
Steve
Don't reference the timestamp column at all in your INSERT (or future
UPDATE) statements and the timestamp should update just fine on its own.
i.e.
INSERT INTO Owners (NameID,ProductsKey,RegNum)
VALUES ('$NameID','1','$RegNumc');
BTW, you cannot change the default for a timestamp column
You have not shown us what you are doing, only described it.
Write a test case that creates a table with a timestamp field, populates the
table, and does a select on it. Show us what you are doing, and the
results.
Steve Osborne wrote:
I've tried passing nothing '' and NULL and 'NULL
You are inserting the string 'NULL'
Don't include it at all in the insert.
Steve Osborne wrote:
Timestamp additional info:
INSERT INTO Owners (NameID,ProductsKey,RegNum,ProdRegDate)
VALUES ('$NameID','1','$RegNumc','NULL');
ProdRegDate is the field that I want to timestamp. (Again, I've
mysql CREATE TABLE tblTEST (
- KeyValue int(10) NOT NULL default 0,
- DataValue varchar(255) default NULL,
- LastEdited timestamp(14) NOT NULL,
- PRIMARY KEY (KeyValue)
- );
mysql insert into tblTEST (KeyValue, DataValue) values( 1, 'Hello');
Query OK, 1 row affected
Thanks, it is working perfectly as described
Steve
Don't reference the timestamp column at all in your INSERT (or future
UPDATE) statements and the timestamp should update just fine on its own.
i.e.
INSERT INTO Owners (NameID,ProductsKey,RegNum)
VALUES ('$NameID','1','$RegNumc
At 12:18 -0800 2001/12/14, Steve Osborne wrote:
Timestamp additional info:
INSERT INTO Owners (NameID,ProductsKey,RegNum,ProdRegDate)
VALUES ('$NameID','1','$RegNumc','NULL');
ProdRegDate is the field that I want to timestamp. (Again, I've tried
passing '', NULL, and 'NULL').
Steve
Hi
If you need a timestamp that is automatically updated when a record is
inserted, replaced, or updated, declare one field in the record as
TIMESTAMP:
create table mytable (
myvalue int default 0,
mytime TIMESTAMP
}
INSERT INTO mytable VALUES( 123, NULL );
-Original Message-
From
Can anyone give me a good link on how to put in a timestamp on a form
that inserts directly into a sql database??? I keep trying it, but it's
only coming thru as 00 , so on.
Thanks.
Newbie Jake.
-
Before posting
Hi,
Depends on what type of timestamp you are looking at. But
in general, you use the mysql built in function:
now() and if you want to convert that into unix_timestamp,
unix_timestamp(now()) will do the trick.
mysql select now();
+-+
| now
At 11:25 PM 12/4/01 -0700, *Himerus* wrote:
Can anyone give me a good link on how to put in a timestamp on a form
that inserts directly into a sql database??? I keep trying it, but it's
only coming thru as 00 , so on.
I enter my timestamp as a unix timestamp in an INT field.
I
In message [EMAIL PROTECTED], Mark Worsdall
[EMAIL PROTECTED] writes
Hi,
Want I need is to find out when a table was last updated, not a records
timestamp.
Is there a way?
or for SW people:
way is there a?
Obviously not.
--
Work:- postmasterAThinwick.demon.co.uk
401 - 500 of 548 matches
Mail list logo