Re: Timestamp issue

2002-09-17 Thread Mikhail Entaltsev
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

re: Timestamp issue in mysql

2002-09-17 Thread Victoria Reznichenko
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

TIMESTAMP compare fails on RH 7.3

2002-09-05 Thread Ram Rajadhyaksha
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

How to get timestamp of inserted record

2002-07-30 Thread Jenny Christy
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

RE: How to get timestamp of inserted record

2002-07-30 Thread Peter Normann
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

RE: How to get timestamp of inserted record

2002-07-30 Thread toby -
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

RE: How to get timestamp of inserted record

2002-07-30 Thread Ed Carp
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

Re: Is type of datetime timestamp same??

2002-07-26 Thread Mateus Begossi
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

Re: Is type of datetime timestamp same??

2002-07-25 Thread Peter
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

Is type of datetime timestamp same??

2002-07-24 Thread Jenny Christy
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

Is type of datetime timestamp same??

2002-07-24 Thread Jenny Christy
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

Re: ODBC and TimeStamp

2002-07-15 Thread Patrick Sherrill
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

Re: ODBC and TimeStamp

2002-07-15 Thread Todd Cary
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

RE: ODBC and TimeStamp

2002-07-15 Thread Jay Blanchard
[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

Re: ODBC and TimeStamp

2002-07-15 Thread Todd Cary
) 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

Re: ODBC and TimeStamp

2002-07-15 Thread Patrick
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

Re: ODBC and TimeStamp

2002-07-15 Thread Todd Cary
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:

ODBC and TimeStamp

2002-07-14 Thread Todd Cary
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

Binding Timestamp Columns with myODBC

2002-07-09 Thread Mateus Begossi
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

Feching results, and Timestamp

2002-07-08 Thread Mateus Begossi
= ? 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

timestamp problem ..

2002-06-14 Thread Wouter van Vliet
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

RE: timestamp problem ..

2002-06-14 Thread Luc Foisy
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

Re: timestamp problem ..

2002-06-14 Thread Victoria Reznichenko
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

Re: timestamp problem ..

2002-06-14 Thread Steve Edberg
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

RE: timestamp problem ..

2002-06-14 Thread Wouter van Vliet
: 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

Re: timestamp

2002-05-30 Thread Victoria Reznichenko
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

timestamp

2002-05-29 Thread r
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

Re: timestamp(8) GROUP BY problem

2002-05-28 Thread Gerald Clark
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

Re: timestamp(8) GROUP BY problem

2002-05-28 Thread Egor Egorov
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

Re: timestamp(8) GROUP BY problem

2002-05-28 Thread Keith C. Ivey
| +--+--+ 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

timestamp(8) GROUP BY problem

2002-05-27 Thread sitnikov
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

timestamp primary key's value improperly changing on sql update

2002-05-22 Thread jmessner
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

RE: timestamp primary key's value improperly changing on sql update

2002-05-22 Thread Salada, Duncan
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

TIMESTAMP field

2002-05-20 Thread Alex Pilson
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

Re: TIMESTAMP field

2002-05-20 Thread Benjamin Pflugmann
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

Re: TIMESTAMP field : nevermind

2002-05-20 Thread Alex Pilson
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

Re: Timestamp and Load Data command

2002-04-16 Thread Keith C. Ivey
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

Re: Timestamp and Load Data command

2002-04-16 Thread Victoria Reznichenko
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

Timestamp and Load Data command

2002-04-15 Thread Carl McNamee
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

Re: TIMESTAMP(14) or Bigint ??

2002-04-10 Thread Thomas Spahni
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

TIMESTAMP(14) or Bigint ??

2002-04-09 Thread David BORDAS
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

Re: TIMESTAMP(14) or Bigint ??

2002-04-09 Thread David BORDAS
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

Re: TIMESTAMP(14) or Bigint ??

2002-04-09 Thread David BORDAS
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

Auto_increment and TimeStamp Fields

2002-03-25 Thread Eric Baines
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

Re: Auto_increment and TimeStamp Fields

2002-03-25 Thread Paul DuBois
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

Re: Auto_increment and TimeStamp Fields

2002-03-25 Thread Eric Baines
and TimeStamp Fields

Re[3]: group by timestamp field

2002-03-22 Thread Aleksandar Bradaric
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

Re: group by timestamp field

2002-03-22 Thread Jayasimhan A
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

group by timestamp field

2002-03-21 Thread cristian ditoiu
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

Is this a bug in TIMESTAMP?

2002-03-13 Thread J. Ceferino Ortega
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

RE: Is this a bug in TIMESTAMP?

2002-03-13 Thread Roger Baklund
/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

How to timestamp records across time zones? ##

2002-03-11 Thread BD
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

Re: How to timestamp records across time zones? ##

2002-03-11 Thread DL Neil
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

Re: How to timestamp records across time zones? ##

2002-03-11 Thread Keith C. Ivey
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

TIMESTAMP not acting as I'd like

2002-03-06 Thread [EMAIL PROTECTED]
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

Re: TIMESTAMP not acting as I'd like

2002-03-06 Thread James Housley
[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

Re: TIMESTAMP not acting as I'd like

2002-03-06 Thread Douglas Forrest
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

TIMESTAMP not acting as I'd like

2002-03-06 Thread Victoria Reznichenko
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

Re: TIMESTAMP not acting as I'd like

2002-03-06 Thread Shankar Unni
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

Timestamp function formatting bug?

2002-03-06 Thread Shankar Unni
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

TIMESTAMP with DEFAULT broken?

2002-02-26 Thread John D. Kirkpatrick
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

Re: TIMESTAMP with DEFAULT broken?

2002-02-26 Thread Paul DuBois
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

Question about displaying of 'timestamp' field

2002-02-21 Thread Clive Arnold
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

Re: Question about displaying of 'timestamp' field

2002-02-21 Thread DL Neil
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

Are there any other 'automatic' fields apart from timestamp ?.

2002-02-21 Thread Clive Arnold
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

Are there any other 'automatic' fields apart from timestamp ?.

2002-02-21 Thread Victoria Reznichenko
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

When does the timestamp field gets updated?

2002-02-15 Thread George Labuschagne
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

RE: When does the timestamp field gets updated?

2002-02-15 Thread Rick Emery
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

Re: When does the timestamp field gets updated?

2002-02-15 Thread John Cichy
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

Re: When does the timestamp field gets updated?

2002-02-15 Thread DL Neil
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

Incorrect update of timestamp field

2002-02-12 Thread gavin
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

How can I optimize SELECT .. FROM t1, t2 WHERE t1 join t2 ORDER by timestamp DESC LIMIT 10

2002-01-31 Thread Andreas Vierengel
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

update a row without affecting timestamp-type column

2002-01-28 Thread Egor Egorov
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

update a row without affecting timestamp-type column

2002-01-25 Thread webmaster
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

Re: update a row without affecting timestamp-type column

2002-01-25 Thread Paul DuBois
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

timestamp column

2002-01-08 Thread Osnat Rabi
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

RE: timestamp column

2002-01-08 Thread Roger Baklund
* 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

Unix-Timestamp() in myODBC 02.50

2001-12-16 Thread Bart Goormans
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

RE: Fw: timestamp additional info

2001-12-16 Thread *Himerus*
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

Re: Fw: timestamp additional info

2001-12-16 Thread Joseph Bueno
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

RE: Unix-Timestamp() in myODBC 02.50

2001-12-16 Thread Bart Goormans
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

timestamp

2001-12-14 Thread Steve Osborne
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

RE: timestamp

2001-12-14 Thread Rick Emery
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

Fw: timestamp

2001-12-14 Thread Steve Osborne
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

Re: Fw: timestamp

2001-12-14 Thread Gerald Clark
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

RE: timestamp

2001-12-14 Thread Rick Emery
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

Re: Fw: timestamp

2001-12-14 Thread Steve Osborne
: 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

2001-12-14 Thread Steve Osborne
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

Fw: timestamp additional info

2001-12-14 Thread Steve Osborne
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

Re: timestamp additional info

2001-12-14 Thread Chris Cooper
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

Re: Fw: timestamp

2001-12-14 Thread Gerald Clark
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

Re: timestamp additional info

2001-12-14 Thread Gerald Clark
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

RE: timestamp additional info

2001-12-14 Thread Matthew Smith
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

Re: timestamp additional info-SOLVED

2001-12-14 Thread Steve Osborne
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

Re: Fw: timestamp additional info

2001-12-14 Thread Robert Alexander
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

RE: help with timestamp...

2001-12-05 Thread Rick Emery
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

help with timestamp...

2001-12-04 Thread *Himerus*
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

Re: help with timestamp...

2001-12-04 Thread Jaime Teng
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

Re: help with timestamp...

2001-12-04 Thread Kodrik
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

Re: is there a timestamp function for a table

2001-12-01 Thread Mark Worsdall
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

<    1   2   3   4   5   6   >