store timezone
Hi All, Is it possible to store the timezone with datetime data type in mysql or any other approach available to achieve this in mysql. Looking for your help. Thanks, Manoj
Re: store timezone
MySQL doesn't support timezones (I think Postgres does). I usually just store dates as Greenwich Mean Time and store the time zone hours offset in a separate field. Brent Baisley On Tue, Jul 28, 2009 at 7:59 AM, Manoj Singhmanojsingh2...@gmail.com wrote: Hi All, Is it possible to store the timezone with datetime data type in mysql or any other approach available to achieve this in mysql. Looking for your help. Thanks, Manoj -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: store timezone
Agreed. Store as UTC. You can always convert to the needed timezone during query or during display. See MySQL's CONVERT_TZ() function. On Tue, Jul 28, 2009 at 8:29 AM, Brent Baisley brentt...@gmail.com wrote: MySQL doesn't support timezones (I think Postgres does). I usually just store dates as Greenwich Mean Time and store the time zone hours offset in a separate field. Brent Baisley On Tue, Jul 28, 2009 at 7:59 AM, Manoj Singhmanojsingh2...@gmail.com wrote: Hi All, Is it possible to store the timezone with datetime data type in mysql or any other approach available to achieve this in mysql. Looking for your help. Thanks, Manoj -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=joh...@pixelated.net -- - Johnny Withers 601.209.4985 joh...@pixelated.net
tracing table updates
Hi All, I have a mysql cluster setup with 2 nodes. I would like to log all updates for a certain, only updates, not inserts, is it possible? would i be able to tell when it was updated and from what IP address the update came from? coz i have an issue wherein a certain table is being updated but i could not tell where or when. thanks in advanced. Regards, Ron -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: tracing table updates
Ron I would like to log all updates for a certain, only updates, not inserts, is it possible? Sure. For a review of methods for various kinds of audit trails see Audit Trails Parts I II at http://www.artfulsoftware.com/infotree/mysqltips.php. PB Ron wrote: Hi All, I have a mysql cluster setup with 2 nodes. I would like to log all updates for a certain, only updates, not inserts, is it possible? would i be able to tell when it was updated and from what IP address the update came from? coz i have an issue wherein a certain table is being updated but i could not tell where or when. thanks in advanced. Regards, Ron No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.392 / Virus Database: 270.13.34/2268 - Release Date: 07/28/09 06:00:00
User Defined Types
Hello, I am evaluating MySQL. I am coming from Microsoft SQL Server 2005. This may have been discussed before but I have not been able to find it. In SQL Server you are able to define a user-defined type like this: CREATE TYPE [dbo].[status] FROM INT NOT NULL This will allow you to then define columns like this: CREATE TABLE [dbo].[tableName] ( [statusColumn] [dbo].[status] ) Is there such a thing in MySQL? Thanks, Jeff
RE: User Defined Types
Nope -Original Message- From: Jeff Lanzarotta [mailto:delux256-my...@yahoo.com] Sent: Tuesday, July 28, 2009 11:37 AM To: mysql@lists.mysql.com Subject: User Defined Types Hello, I am evaluating MySQL. I am coming from Microsoft SQL Server 2005. This may have been discussed before but I have not been able to find it. In SQL Server you are able to define a user-defined type like this: CREATE TYPE [dbo].[status] FROM INT NOT NULL This will allow you to then define columns like this: CREATE TABLE [dbo].[tableName] ( [statusColumn] [dbo].[status] ) Is there such a thing in MySQL? Thanks, Jeff The information contained in this transmission may contain privileged and confidential information. It is intended only for the use of the person(s) named above. If you are not the intended recipient, you are hereby notified that any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
RE: User Defined Types
Darn, oh well. Thanks for the quick response. --- On Tue, 7/28/09, Gavin Towey gto...@ffn.com wrote: From: Gavin Towey gto...@ffn.com Subject: RE: User Defined Types To: delux256-my...@yahoo.com delux256-my...@yahoo.com, mysql@lists.mysql.com mysql@lists.mysql.com Date: Tuesday, July 28, 2009, 2:39 PM Nope -Original Message- From: Jeff Lanzarotta [mailto:delux256-my...@yahoo.com] Sent: Tuesday, July 28, 2009 11:37 AM To: mysql@lists.mysql.com Subject: User Defined Types Hello, I am evaluating MySQL. I am coming from Microsoft SQL Server 2005. This may have been discussed before but I have not been able to find it. In SQL Server you are able to define a user-defined type like this: CREATE TYPE [dbo].[status] FROM INT NOT NULL This will allow you to then define columns like this: CREATE TABLE [dbo].[tableName] ( [statusColumn] [dbo].[status] ) Is there such a thing in MySQL? Thanks, Jeff The information contained in this transmission may contain privileged and confidential information. It is intended only for the use of the person(s) named above. If you are not the intended recipient, you are hereby notified that any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
Re: tracing table updates
Hi Peter, Thanks for your help. I now created a trigger that would do an insert on another table on what changes has been made to the other table. another question is, is it possible to get the host from where the update request came from from the trigger? Regards Ron Peter Brawley wrote: Ron I would like to log all updates for a certain, only updates, not inserts, is it possible? Sure. For a review of methods for various kinds of audit trails see Audit Trails Parts I II at http://www.artfulsoftware.com/infotree/mysqltips.php. PB Ron wrote: Hi All, I have a mysql cluster setup with 2 nodes. I would like to log all updates for a certain, only updates, not inserts, is it possible? would i be able to tell when it was updated and from what IP address the update came from? coz i have an issue wherein a certain table is being updated but i could not tell where or when. thanks in advanced. Regards, Ron No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.392 / Virus Database: 270.13.34/2268 - Release Date: 07/28/09 06:00:00 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org