Re: timestamp not null

2006-04-10 Thread [EMAIL PROTECTED]
timeout has expired or not and so act accordingly. I guess I can use some sort of integer in order to represent it as a unix timestamp, but I would prefer to use a timestamp. Any suggestions? Kind regards Mensaje original De: [EMAIL PROTECTED] Recibido: 10/04/2006 11:51 Para: [EMAIL

Re: timestamp not null

2006-04-10 Thread Martijn Tonies
timeout has expired or not and so act accordingly. I guess I can use some sort of integer in order to represent it as a unix timestamp, but I would prefer to use a timestamp. As I said -- to store date/time values, you should NOT use the TIMESTAMP datatype, cause it isn't supposed to be used to store

UNSIGNED_FLAG returned for column type timestamp ?

2006-04-07 Thread Barbara Deaton
I'm using the MySQL 5.0.15 client to a 5.0 server all 32-bit windows. It appears that the UNSIGNED_FLAG is being returned for column types of timestamp. Checking the flags variable of the MYSQL_FIELD structure indicates that the following flags are returned: Field-flags = 1249 NOT_NULL_FLAG

Re: TIMESTAMP field not automatically updating last_updated field

2006-04-02 Thread Jonathan Mangin
- Original Message - From: Ferindo Middleton Jr [EMAIL PROTECTED] To: Ferindo Middleton Jr [EMAIL PROTECTED] Cc: Hank [EMAIL PROTECTED]; mysql@lists.mysql.com Sent: Friday, March 31, 2006 7:30 PM Subject: Re: TIMESTAMP field not automatically updating last_updated field Ferindo

Re: TIMESTAMP field not automatically updating last_updated field

2006-03-31 Thread Hank
Are the other fields in the update statement actually changing the data? I don't know for sure, but if the data on disk is the same as the update statement, mysql won't actually update the record, and therefore might not update the last_updated field also. Just a thought. -- MySQL General

Re: TIMESTAMP field not automatically updating last_updated field

2006-03-31 Thread Barry
true. No Update = No change of timestamp! -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: TIMESTAMP field not automatically updating last_updated field

2006-03-31 Thread Ferindo Middleton Jr
understand that one concept. I have seen it before If you do an update on a record but the actually values that you are passing in the statement are the exact values as were there before, no update to the timestamp field is made because none of the records values actually changed

Re: TIMESTAMP field not automatically updating last_updated field

2006-03-31 Thread Ferindo Middleton Jr
. Just a thought. Yes, I understand that one concept. I have seen it before If you do an update on a record but the actually values that you are passing in the statement are the exact values as were there before, no update to the timestamp field is made because none of the records values

TIMESTAMP field not automatically updating last_updated field

2006-03-30 Thread Ferindo Middleton Jr
usually use the following line in my table declarations: last_updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, In some tables it automatically updates on subsequent updates to the table and in others it will not. The purpose here is to have the last_updated field automatically append

Re: TIMESTAMP field not automatically updating last_updated field

2006-03-30 Thread Scott Haneda
usually use the following line in my table declarations: last_updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, In some tables it automatically updates on subsequent updates to the table and in others it will not. The purpose here is to have the last_updated field automatically append

Re: TIMESTAMP field not automatically updating last_updated field

2006-03-30 Thread jonathan
are you having two timestamp fields in a table (ie a created and a last_updated)? -j On Mar 30, 2006, at 5:17 PM, Ferindo Middleton Jr wrote: I think I've seen this complaint posted before but I ignored but now I realize that in some of my db tables' last_updated field the value

Re: TIMESTAMP field not automatically updating last_updated field

2006-03-30 Thread Ferindo Middleton Jr
jonathan wrote: are you having two timestamp fields in a table (ie a created and a last_updated)? -j On Mar 30, 2006, at 5:17 PM, Ferindo Middleton Jr wrote: I think I've seen this complaint posted before but I ignored but now I realize that in some of my db tables' last_updated field

best way to handle two timestamp times

2006-03-27 Thread jonathan
with two timestamp values (#1293 - Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause). If I can have only one timestamp in the table, what is the ideal way to do this? thanks, jon -- MySQL General Mailing List For list

Re: best way to handle two timestamp times

2006-03-27 Thread Gabriel PREDA
You can make the first timestamp without autoupdating and a default value with no importance... and the second with DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP When you insert a new row.. .you'll use: Asuming the table has columns: col1, ., colN, col_timestamp1, col_timestamp2

Timestamp problem in mysql5.0.18

2006-03-21 Thread Ricardas.S
Hi All, Today, I encountered problem when trying to insert '2006-03-26 03:00:00' value into timestamp column: CREATE TABLE `test` ( `a` timestamp ) ENGINE = InnoDB DEFAULT CHARSET = latin1 COLLATE = latin1_german1_ci; INSERT INTO test VALUES ('2006-03-26 03:00:00' ); Server response was: ERROR

RE: Timestamp problem in mysql5.0.18

2006-03-21 Thread Jason Teagle
: Ricardas.S [mailto:[EMAIL PROTECTED] Sent: 21 March 2006 14:31 To: [EMAIL PROTECTED] Subject: Re: Timestamp problem in mysql5.0.18 Yes, I think you are right, it should be the main reason of insert failure. Thank you for good idea. Ricka - Original Message - From: Jason Teagle [EMAIL

Re: timestamp

2006-03-14 Thread sheeri kritzer
definition the default attributes are (ON UPDATE CURRENT_TIMESTAMP). Reading the manual my understanding is this is saying that the auto timestamp update feature is active. The manual does not say what the trigger is to make the timestamp in the row to be bumped to the current timestamp. I

Problems with timestamp field after upgrading MySQL Server.

2006-03-13 Thread Yesmin Patwary
Dear All, First of all, I would like to thank to Josh and Peter Brawley for their kind help on previous issue. Here is another Issue: There are many tables that have timestamp field with 8 char (mmdd). I use this format all over our website and to create various reports

Problems with timestamp field after upgrading MySQL Server.

2006-03-13 Thread Yesmin Patwary
Dear All, First of all, I would like to thank to Josh and Peter Brawley for their kind help on previous issue. Here is another Issue: There are many tables that have timestamp field with 8 char (mmdd). I use this format all over our website and to create various reports

Re: Problems with timestamp field after upgrading MySQL Server.

2006-03-13 Thread Josh
help on previous issue. Here is another Issue: There are many tables that have timestamp field with 8 char (mmdd). I use this format all over our website and to create various reports. Below is static php code that I used numerous places: ? $year=substr($date, 0, 4

Re: Problems with timestamp field after upgrading MySQL Server.

2006-03-13 Thread SGreen
--- Yesmin Patwary [EMAIL PROTECTED] wrote: Dear All, First of all, I would like to thank to Josh and Peter Brawley for their kind help on previous issue. Here is another Issue: There are many tables that have timestamp field with 8 char (mmdd). I use this format

timestamp

2006-03-13 Thread fbsd_user
In my mysql 4.4 table definition the default attributes are (ON UPDATE CURRENT_TIMESTAMP). Reading the manual my understanding is this is saying that the auto timestamp update feature is active. The manual does not say what the trigger is to make the timestamp in the row to be bumped

Re: timestamp

2006-03-13 Thread SGreen
fbsd_user [EMAIL PROTECTED] wrote on 03/13/2006 01:10:17 PM: In my mysql 4.4 table definition the default attributes are (ON UPDATE CURRENT_TIMESTAMP). Reading the manual my understanding is this is saying that the auto timestamp update feature is active. The manual does not say what

TimeStamp issue

2006-03-02 Thread rtroiana
Hi All, I have recently noticed in the MySQL 5.0 documentation in section 11.3.1. The DATETIME, DATE, and TIMESTAMP Types, it's mentioned that TIMESTAMP values cannot be earlier than 1970 or later than 2037. This means that a date such as '1968-01-01', while legal as a DATETIME or DATE

Re: TimeStamp issue

2006-03-02 Thread gerald_clark
rtroiana wrote: Hi All, I have recently noticed in the MySQL 5.0 documentation in section 11.3.1. The DATETIME, DATE, and TIMESTAMP Types, it's mentioned that TIMESTAMP values cannot be earlier than 1970 or later than 2037. This means that a date such as '1968-01-01', while legal

Re: TimeStamp issue

2006-03-02 Thread Rhino
If you need a broader range of dates, you could use DATETIME instead of TIMESTAMP: DATETIME can handle the range '1000-01-01 00:00:00' through '-12-31 23:59:59'. The only big difference is that DATETIME does not store the fractional part of the seconds, e.g. milliseconds/microseconds

Re: TimeStamp issue

2006-03-02 Thread SGreen
a separate column to store any values that represent fractions of seconds. Shawn Green Database Administrator Unimin Corporation - Spruce Pine Rhino [EMAIL PROTECTED] wrote on 03/02/2006 01:25:36 PM: If you need a broader range of dates, you could use DATETIME instead of TIMESTAMP: DATETIME can

Fw: TimeStamp issue

2006-03-02 Thread Rhino
. The different formats are explained here: http://dev.mysql.com/doc/refman/5.0/en/datetime.html. -- Rhino - Original Message - From: rtroiana [EMAIL PROTECTED] To: 'Rhino' [EMAIL PROTECTED] Sent: Thursday, March 02, 2006 1:29 PM Subject: RE: TimeStamp issue Thanks for the reply. I'm using

Re: TimeStamp issue

2006-03-02 Thread Rhino
] To: Rhino Cc: mysql@lists.mysql.com ; rtroiana Sent: Thursday, March 02, 2006 1:42 PM Subject: Re: TimeStamp issue In fact, no time values in MySQL are fractional (yet). All times are stored to the nearest second regardless of which date-time-like storage type you use

RE: TimeStamp issue

2006-03-02 Thread rtroiana
Thanks to all of you for replying. I'm using DATETIME instead of TIMESTAMP now. Although I still haven't find the answer for my second question. I used to use CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP as default value for my TimeStamp column. Is there a way to assign default value

Re: TimeStamp issue

2006-03-02 Thread sheeri kritzer
On 3/2/06, rtroiana [EMAIL PROTECTED] wrote: Thanks to all of you for replying. I'm using DATETIME instead of TIMESTAMP now. Although I still haven't find the answer for my second question. I used to use CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP as default value for my TimeStamp

Timestamp error

2006-02-12 Thread pedro mpa
Greetings! I am building a website using MySQL 5.0.18 and PHP 5.1.2. When I try to insert in a table a timestamp value from php's mktime() I get the following error: 1292: Incorrect datetime value: '1139776424' for column 'access_date' at row 1 The sql for the table is: CREATE TABLE `members_acs

Re: Timestamp error

2006-02-12 Thread Michael Stassen
pedro mpa wrote: Greetings! I am building a website using MySQL 5.0.18 and PHP 5.1.2. When I try to insert in a table a timestamp value from php's mktime() I get the following error: 1292: Incorrect datetime value: '1139776424' for column 'access_date' at row 1 The sql for the table is: CREATE

timestamp

2005-12-18 Thread mihai.chira
hi! I'm using mysql 4.1 and I have a problem with a TIMESTAMP column (with all of them actually). I've used them before in mysql 3.x and they worked just fine. And at first I thought 'they changed something', but in the mysql 4.1 manual it still says A TIMESTAMP column is useful for recording

Re: timestamp

2005-12-18 Thread Richard AB
Hello. Have you checked if the timestamp column is set with CURRENT_TIMESTAMP as the default value? If it doesnt, you can try this: ALTER TABLE tbl MODIFY column TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; And mysql will fill the column with current timestamp

UNIX timestamp with microseconds

2005-11-16 Thread Ryan Escarez
is possible to get UNIX timestamp with microseconds when i try the following it just give 10 digits mysqlSELECT unix_timestamp('20051114095641'+ INTERVAL 0 HOUR) as ts; output : 1131933401 --- 10 digits any tips? tia! -- MySQL General Mailing List For list archives: http://lists.mysql.com

timestamp

2005-11-16 Thread Ryan Escarez
is it possible to get the the given (unix)timestamp in milliseconds since the epoch? tia! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: timestamp

2005-11-16 Thread Petr Chardin
Hi Ryan, On Wed, 2005-11-16 at 19:16 +0800, Ryan Escarez wrote: is it possible to get the the given (unix)timestamp in milliseconds since the epoch? No, it is not possible. However this is on the roadmap. This is also reported as Bug #8523: http://bugs.mysql.com/bug.php?id=8523 Regards

Re: UNIX timestamp with microseconds

2005-11-16 Thread Gleb Paharenko
Hello. According to the manual Unix timestamp (seconds since '1970-01-01 00:00:00', so, in my opinion UNIX_TIMESTAMP is not designed for obtaining microseconds. Have a look here, if you haven't done this yet: http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html Ryan

Re: timestamp

2005-11-16 Thread Ehrwin Mina
Ryan, Try to use this date functions. * DATE_ADD(date,INTERVAL expr type) , DATE_SUB(date,INTERVAL expr type) These functions perform date arithmetic. date is a DATETIME or DATE value specifying the starting date. expr is an expression specifying the interval value to be added or

linux timestamp

2005-09-27 Thread Dotan Cohen
Hi all, I have a field in a mysql database v4.0.18 that contains a linux timestamp. I have been googleing for a solution that would return to me all the entries where the timestamp falls on, say a wednesday, or between 2pm to 3pm. I am led to believe that it is possible, but I have found

Re: linux timestamp

2005-09-27 Thread Felix Geerinckx
On 27/09/2005, Dotan Cohen wrote: Hi all, I have a field in a mysql database v4.0.18 that contains a linux timestamp. I have been googleing for a solution that would return to me all the entries where the timestamp falls on, say a wednesday, or between 2pm to 3pm. SET @uts := UNIX_TIMESTAMP

Re: linux timestamp

2005-09-27 Thread Keith Ivey
Dotan Cohen wrote: Hi all, I have a field in a mysql database v4.0.18 that contains a linux timestamp. I have been googleing for a solution that would return to me all the entries where the timestamp falls on, say a wednesday, or between 2pm to 3pm. I am led to believe that it is possible, but I

Re: linux timestamp

2005-09-27 Thread Nigel Wood
Dotan Cohen wrote: Hi all, I have a field in a mysql database v4.0.18 that contains a linux timestamp. I have been googleing for a solution that would return to me all the entries where the timestamp falls on, say a wednesday, or between 2pm to 3pm. I am led to believe that it is possible

Re: linux timestamp

2005-09-27 Thread Dotan Cohen
On 9/27/05, Nigel Wood [EMAIL PROTECTED] wrote: Dotan Cohen wrote: Hi all, I have a field in a mysql database v4.0.18 that contains a linux timestamp. I have been googleing for a solution that would return to me all the entries where the timestamp falls on, say a wednesday, or between 2pm

timestamp and php

2005-08-30 Thread ross
Hi, I have a row in myslq database called time and is just a simple timestamp column When I echo it out echo $row['time']; echo $row['content']; I get the following 2005-08-30 13:50.05 this is the text content Now I am not worried about the time but I would like to know how to (i) sort

Re: timestamp and php

2005-08-30 Thread Scott Noyes
2005-08-30 13:50.05 this is the text content (i) sort the returned rows in order (latest first) http://dev.mysql.com/doc/mysql/en/sorting-rows.html (ii) be able to extract the individual parts of the date and display them in UK format (ddmm)

Re: timestamp and php

2005-08-30 Thread Michael Stassen
[EMAIL PROTECTED] wrote: Hi, I have a row in mysql database called time and is just a simple timestamp column When I echo it out echo $row['time']; echo $row['content']; I get the following 2005-08-30 13:50.05 this is the text content Now I am not worried about the time but I would like

Re: 4.0 - 4.1 lose timestamp

2005-08-16 Thread Philippe Poelvoorde
Hunter Peress wrote: Yes theres all this talk about timestamp returning different results in 4.1 vs. 4.0 but i took the MYI and MYD and frm files from a winnt running 4.0.14 and transferred to a 4.1.11-Debian_4-log and all the timestamp fields are NULL it seems all the other data is fine

Re: 4.0 - 4.1 lose timestamp [fixed]

2005-08-16 Thread Hunter Peress
the issue was because i was viewing the database through cocoamysql, which registered the timestamps as null. stupid me viewing the database through the commandline showed up fine --- Hunter Peress

unix timestamp

2005-08-15 Thread Sebastian
i have this query: SELECT COUNT(*) AS score FROM downloads WHERE date_add(dateline, interval 1 hour) = now() GROUP BY filename ORDER BY score DESC unfortunately for other reasons i had to change `dateline` to unix timestamp so this query is no longer able to run as intended. can anyone help

Re: unix timestamp

2005-08-15 Thread SGreen
Sebastian [EMAIL PROTECTED] wrote on 08/15/2005 03:51:05 PM: i have this query: SELECT COUNT(*) AS score FROM downloads WHERE date_add(dateline, interval 1 hour) = now() GROUP BY filename ORDER BY score DESC unfortunately for other reasons i had to change `dateline` to unix timestamp so

Re: unix timestamp

2005-08-15 Thread Chris
(dateline, interval 1 hour) = now() GROUP BY filename ORDER BY score DESC unfortunately for other reasons i had to change `dateline` to unix timestamp so this query is no longer able to run as intended. can anyone help with a work around? btw, i am using php to run queries if that helps find

Re: unix timestamp

2005-08-15 Thread Scott Gifford
Sebastian [EMAIL PROTECTED] writes: i have this query: SELECT COUNT(*) AS score FROM downloads WHERE date_add(dateline, interval 1 hour) = now() GROUP BY filename ORDER BY score DESC unfortunately for other reasons i had to change `dateline` to unix timestamp so this query is no longer

Re: unix timestamp

2005-08-15 Thread Keith Ivey
Scott Gifford wrote: SELECT COUNT(*) AS score FROM downloads WHERE dateline + 3600 = UNIX_TIMESTAMP() GROUP BY filename ORDER BY score DESC It would be better with WHERE dateline = UNIX_TIMESTAMP() - 3600 so that it can use an index on dateline. -- Keith Ivey [EMAIL

Re: unix timestamp

2005-08-15 Thread Scott Gifford
Keith Ivey [EMAIL PROTECTED] writes: Scott Gifford wrote: SELECT COUNT(*) AS score FROM downloads WHERE dateline + 3600 = UNIX_TIMESTAMP() GROUP BY filename ORDER BY score DESC It would be better with WHERE dateline = UNIX_TIMESTAMP() - 3600 so that it can use an index

Re: unix timestamp

2005-08-15 Thread Bastian Balthazar Bux
Sebastian wrote: i have this query: SELECT COUNT(*) AS score FROM downloads WHERE date_add(dateline, interval 1 hour) = now() GROUP BY filename ORDER BY score DESC unfortunately for other reasons i had to change `dateline` to unix timestamp so this query is no longer able to run

4.0 - 4.1 lose timestamp

2005-08-15 Thread Hunter Peress
Yes theres all this talk about timestamp returning different results in 4.1 vs. 4.0 but i took the MYI and MYD and frm files from a winnt running 4.0.14 and transferred to a 4.1.11-Debian_4-log and all the timestamp fields are NULL it seems all the other data is fine. Any ideas? i suppose

timestamp resolution problem (rounding off to a day)

2005-07-29 Thread Nick Sinclair
Hi All, I seem to be having a problem with the resolution using the timestamp function. I am accessing the database snort on an ACID/SNORT/MySQL installation utilizing a collection of shell scripts that are run as cron jobs and function as a bot adding and removing firewall rules (iptables

Timestamp problem.

2005-07-13 Thread Antonio Gulli
I have the following part in a schema describe feeds . | pubdate | timestamp| YES | | CURRENT_TIMESTAMP | | show create table feeds; `pubdate` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, when i make an INSERT INTO feeds

RE: Timestamp problem.

2005-07-13 Thread John Trammell
(0.00 sec) If you're trying to add seconds onto a timestamp, you're probably looking for something like: SELECT FROM_UNIXTIME(UNIX_TIMESTAMP(NOW()) + 1*RAND()); -Original Message- From: Antonio Gulli [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 13, 2005 8:31 AM To: mysql

timestamp problem

2005-06-14 Thread manasvini nandakumar
Hi all, I have a very strange problem with mysql-4.0.22 running on a big endian processor platform.When the timestamp gets updated as '2005-01-01 23:00:00', it actually seems to be converted internally as 2005010423.Similarly '2005-01-02 23:00:00' is '2005010523'. The problem is that let

Re: timestamp problem

2005-06-14 Thread Gleb Paharenko
Hello. There were several bugs related to timestamp at 4.0.22 and later. Does the problem remains on 4.1.12 (4.0.24)? manasvini nandakumar [EMAIL PROTECTED] wrote: Hi all, I have a very strange problem with mysql-4.0.22 running on a big endian processor platform.When

Timestamp and it's usage (Re: Seriously.. When are we going to get subqueries?!)

2005-06-09 Thread Martijn Tonies
You can have any number of timestamp columns, but only one of them can be set to autoupdate. As of 4.1 you are not limited to this being the 1st one in the table and CURRENT_TIMESTAMP, CURRENT_TIMESTAMP(), or NOW() can be used in the DEFAULT. Read http://dev.mysql.com/doc/mysql/en/timestamp

Re: Timestamp and it's usage (Re: Seriously.. When are we going to get subqueries?!)

2005-06-09 Thread Jochem van Dieten
On 6/9/05, Martijn Tonies wrote: http://dev.mysql.com/doc/mysql/en/timestamp-4-1.html Absolutely brilliant document *g* ... So now, it makes a difference if it's the first TIMESTAMP column, if it's running in MaxDB mode, if it has a defaulf of NULL (which will be silently changed

Re: Timestamp and it's usage (Re: Seriously.. When are we going to get subqueries?!)

2005-06-09 Thread Martijn Tonies
http://dev.mysql.com/doc/mysql/en/timestamp-4-1.html Absolutely brilliant document *g* ... So now, it makes a difference if it's the first TIMESTAMP column, if it's running in MaxDB mode, if it has a defaulf of NULL (which will be silently changed), if it has no default, a default

TimeStamp Output changed from 4.0 to 4.1 Problem

2005-06-07 Thread Tom Weber
Hi, We would like to upgrade our current installation of Mysql 4.0.x to 4.1 to be able to switch fastly to the MySQL Cluster Solution. The problem is, that we were using the TIMESTAMP type quite heavily in the SELECTS, and we splitted the result using for example, substring in php, so we

Re: Different TIMESTAMP columns

2005-05-19 Thread mfatene
Hi, You have two way to set two default timestamp columns. FIRST : just use a variable : mysql select @t:=current_timestamp; +---+ | @t:=current_timestamp | +---+ | 2005-05-19 08:58:56 | +---+ 1 row in set (0.01

Different TIMESTAMP columns

2005-05-18 Thread Lieven De Keyzer
this: CREATE TABLE bookmark ( bookmark_id INTEGER NOT NULL AUTO_INCREMENT, bookmarkname VARCHAR (80) NOT NULL, url VARCHAR (150) NOT NULL, folder_id INTEGER NOT NULL, last_scanned TIMESTAMP NOT NULL, PRIMARY KEY (bookmark_id), FOREIGN KEY (folder_id) REFERENCES folder(folder_id) ON DELETE CASCADE

Re: Different TIMESTAMP columns

2005-05-18 Thread mfatene
Hi, look at default initialised to current_timestamp. you ca see also on update : http://dev.mysql.com/doc/mysql/en/timestamp-4-1.html Mathias Selon Lieven De Keyzer [EMAIL PROTECTED]: I 'm writing a webapplication in Java that allows users to store bookmarks. The system scans these pages

Re: Different TIMESTAMP columns

2005-05-18 Thread Lieven De Keyzer
Yes, that's what I'm talking about. Only one column can have this current_timestamp as default statement. From: [EMAIL PROTECTED] To: Lieven De Keyzer [EMAIL PROTECTED] CC: mysql@lists.mysql.com Subject: Re: Different TIMESTAMP columns Date: Wed, 18 May 2005 19:57:43 +0200 Hi, look at default

Re: Different TIMESTAMP columns

2005-05-18 Thread SGreen
about changed bookmarks. The bookmark table provisionally looks like this: CREATE TABLE bookmark ( bookmark_id INTEGER NOT NULL AUTO_INCREMENT, bookmarkname VARCHAR (80) NOT NULL, url VARCHAR (150) NOT NULL, folder_id INTEGER NOT NULL, last_scanned TIMESTAMP NOT NULL, PRIMARY

Re: Different TIMESTAMP columns

2005-05-18 Thread Lieven De Keyzer
From: [EMAIL PROTECTED] To: Lieven De Keyzer [EMAIL PROTECTED] CC: mysql@lists.mysql.com Subject: Re: Different TIMESTAMP columns Date: Wed, 18 May 2005 15:05:17 -0400 Lieven De Keyzer [EMAIL PROTECTED] wrote on 05/18/2005 01:44:31 PM: I 'm writing a webapplication in Java that allows users

Re: Different TIMESTAMP columns

2005-05-18 Thread SGreen
Lieven De Keyzer [EMAIL PROTECTED] wrote on 05/18/2005 03:21:02 PM: From: [EMAIL PROTECTED] To: Lieven De Keyzer [EMAIL PROTECTED] CC: mysql@lists.mysql.com Subject: Re: Different TIMESTAMP columns Date: Wed, 18 May 2005 15:05:17 -0400 Lieven De Keyzer [EMAIL PROTECTED] wrote on 05

Re: Different TIMESTAMP columns

2005-05-18 Thread Mark Matthews
Corporation - Spruce Pine I am not sure which Java package you are using (or I would look at its documentation to make sure of what I am about to say) but it makes sense to me that an object of the Java timestamp class would map to a MySQL datetime field. What happens when you try

Re: Different TIMESTAMP columns

2005-05-18 Thread Lieven De Keyzer
From: Mark Matthews [EMAIL PROTECTED] To: Lieven De Keyzer [EMAIL PROTECTED] CC: [EMAIL PROTECTED], mysql@lists.mysql.com Subject: Re: Different TIMESTAMP columns Date: Wed, 18 May 2005 14:58:41 -0500 -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: Lieven De Keyzer [EMAIL

Re: Different TIMESTAMP columns

2005-05-18 Thread Simon Garner
Lieven De Keyzer wrote: But how do I initialize the 2 datetime fields? With no DEFAULT, their values are -00-00 00:00:00. Just what I wanted to avoid with TIMESTAMP Set their value to NOW() if you want the current date/time. -Simon -- MySQL General Mailing List For list archives: http

Re: Different TIMESTAMP columns

2005-05-18 Thread Lieven De Keyzer
KEY (bookmark_id), - FOREIGN KEY (folder_id) REFERENCES folder(folder_id) ON DELETE CASCADE) TYPE = InnoDB; ERROR 1067 (42000): Invalid default value for 'last_scanned' From: Simon Garner [EMAIL PROTECTED] To: mysql@lists.mysql.com Subject: Re: Different TIMESTAMP columns Date: Thu, 19 May

Re: Different TIMESTAMP columns

2005-05-18 Thread Simon Garner
Lieven De Keyzer wrote: mysql CREATE TABLE bookmark ( - bookmark_id INTEGER NOT NULL AUTO_INCREMENT, - bookmarkname VARCHAR (80) NOT NULL, - url VARCHAR (150) NOT NULL, - folder_id INTEGER NOT NULL, - last_scanned DATETIME DEFAULT NOW(), - last_notified DATETIME

avg and timestamp/datetime

2005-04-12 Thread James Nobis
result has the correct year (this seems actually to be coincidence and nothing more) but I am not sure exactly what MySQL did for casting. The query produces no errors or warnings. I *think* the incorrect result is an internal timestamp format but with the wrong data. Is there a part of the manual

Re: avg and timestamp/datetime

2005-04-12 Thread SGreen
is an internal timestamp format but with the wrong data. Is there a part of the manual that I missed which explains this unexpected behavior? AVG(col) v FROM_UNIXTIME(AVG(UNIX_TIMESTAMP(col))) 20050258324839 v 2005-03-24 02:05:11 James Nobis Web Developer Academic Superstore 223 W. Anderson

Re: avg and timestamp/datetime

2005-04-12 Thread James Nobis
timestamp format but with the wrong data. Is there a part of the manual that I missed which explains this unexpected behavior? AVG(col) v FROM_UNIXTIME(AVG(UNIX_TIMESTAMP(col))) 20050258324839 v 2005-03-24 02:05:11 James Nobis Web Developer Academic Superstore 223 W. Anderson Ln. Suite A110, Austin, TX

Re: avg and timestamp/datetime

2005-04-12 Thread SGreen
not sure exactly what MySQL did for casting. The query produces no errors orwarnings. I *think* the incorrect result is an internal timestamp format but with the wrong data. Is there a part of the manual that I missed which explains this unexpected behavior? AVG(col) v

dateTime vrs. Timestamp

2005-04-05 Thread DePhillips, Michael P
Hello, Am I gaining anything by using a timestamp instead of using dateTime and calling now(), for example, increased performance, better indexing, etc. I guess another way to ask this is does the MySQL internals handle a timestamp more efficiently than a dateTime. Thanks Michael -- MySQL

RE: dateTime vrs. Timestamp

2005-04-05 Thread J.R. Bullington
IMO, dateTime doesn't parse now() the same way that timeStamp does. If you use now() in a dateTime field, I have found that it doesn't always write the time to the record, while using now() with the timestamp always does. As far as your other questions, the indexing and increased performance, I

Re: dateTime vrs. Timestamp

2005-04-05 Thread Jigal van Hemert
From: DePhillips, Michael P Am I gaining anything by using a timestamp instead of using dateTime and calling now(), for example, increased performance, better indexing, etc. I guess another way to ask this is does the MySQL internals handle a timestamp more efficiently than a dateTime. I

select timestamp + 0

2005-03-16 Thread Mister Jack
Hi, i'm using the 4.1.10 version of mysql. If I do : select max(timestamp + 0 ) as timestamp from news; ++ | timestamp | ++ | 20050314194920 | ++ so i got the full timestamp(14), but if I do : select max(timestamp) + 0 as timestamp from news

Re: select timestamp + 0

2005-03-16 Thread gerald_clark
Mister Jack wrote: Hi, i'm using the 4.1.10 version of mysql. If I do : select max(timestamp + 0 ) as timestamp from news; ++ | timestamp | ++ | 20050314194920 | ++ so i got the full timestamp(14), but if I do : select max(timestamp) + 0

Re: select timestamp + 0

2005-03-16 Thread Mister Jack
It returns : select max(timestamp) as timestamp from news; +-+ | timestamp | +-+ | 2005-03-14 19:49:20 | +-+ and also : select timestamp as timestamp from news limit 1; +-+ | timestamp

Re: select timestamp + 0

2005-03-16 Thread gerald_clark
Mister Jack wrote: It returns : select max(timestamp) as timestamp from news; +-+ | timestamp | +-+ | 2005-03-14 19:49:20 | +-+ The string shown above converted into a number is 2005. ( Unless you think ist should be 1988

Re: select timestamp + 0

2005-03-16 Thread Mister Jack
From the manual : MIN() and MAX() may take a string argument; in such cases they return the minimum or maximum string value. so I understand that for a timestamp column, values are converted and then compared as strings, then the function return a string, so adding + 0 convert it to a number

problem with adding timestamp as a column

2005-02-28 Thread Zhe Wang
Hi, there, I have MySQL 4.1.10. I need to add a timestamp column to an existing table. I am having a problem of setting the newly added column to be the current time. This is what I did: CREATE TABLE try (id INTEGER); INSERT INTO try VALUES(1), (2), (3); ALTER TABLE try ADD timestamp

Re: problem with adding timestamp as a column

2005-02-28 Thread Hank
I'd suggest not using the keyword timestamp as a column name. I'd suggest using ts or tstamp or something like that. To update the records to the current timestamp: update try set tstamp=null; should do it. I don't know why the default isn't working, though. On Mon, 28 Feb 2005 10:05

Re: problem with adding timestamp as a column

2005-02-28 Thread Joerg Bruehe
Hi! Am Mo, den 28.02.2005 schrieb Hank um 17:09: [top-posting reordered!] On Mon, 28 Feb 2005 10:05:32 -0500, Zhe Wang [EMAIL PROTECTED] wrote: Hi, there, I have MySQL 4.1.10. I need to add a timestamp column to an existing table. I am having a problem of setting the newly added column

Re: problem with adding timestamp as a column

2005-02-28 Thread Zhe Wang
, 28 Feb 2005 10:05:32 -0500, Zhe Wang [EMAIL PROTECTED] wrote: Hi, there, I have MySQL 4.1.10. I need to add a timestamp column to an existing table. I am having a problem of setting the newly added column to be the current time. This is what I did: CREATE TABLE try (id INTEGER

Filtering a date/time out of timestamp

2005-02-17 Thread Scott Hamm
I have been trying to figure out a way to filter a date out of timestamp to no success. How do I filter out specific critieria that I need using now()? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: Filtering a date/time out of timestamp

2005-02-17 Thread Jay Blanchard
[snip] I have been trying to figure out a way to filter a date out of timestamp to no success. How do I filter out specific critieria that I need using now()? [/snip] http://www.mysql.com/substring WHERE now() = substring(dateTimeColumnName, 1, 8) should get it -- MySQL General Mailing List

Re: Filtering a date/time out of timestamp

2005-02-17 Thread Scott Hamm
Thanks to both of you, here is my string: select * from test where date(now())=substring(date,1,10); :) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Current Timestamp upon creating of a record

2004-12-18 Thread Frank Fischer
Hi all i would like to create a Timestamp upon initial creation of a record. I expected this could be done using now() in my INSERT statement but obv. the related field gets actualised each time a record is updated. Unfortunately that's not what i like - i would like to have the timestamp set

Re: Current Timestamp upon creating of a record

2004-12-18 Thread Jigal van Hemert
i would like to create a Timestamp upon initial creation of a record. I expected this could be done using now() in my INSERT statement but obv. the related field gets actualised each time a record is updated. Unfortunately that's not what i like - i would like to have the timestamp set just

<    1   2   3   4   5   6   >