Search the web
Sign In
New User? Sign Up
extremeperl · Extreme Perl
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
shouldn't all datatables be timestamped?   Message List  
Reply | Forward Message #112 of 500 |
Re: [extremeperl] shouldn't all datatables be timestamped?


The document says it works for 4.1.x or above.
Create a table with timestamp column with default as
current_timestamp so you can avoid the INSERT load.
CREATE TABLE tmp (

ts2 TIMESTAMP DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP);



-Shanker

--- Terrence Brannon <terry@...> wrote:

> During development, I often want to quickly see if a
> table just
> successfully inserted a new record.
>
> In MySQL, a field can be used this way. Are there
> any drawbacks to
> using such a field? Of course inserts will be a bit
> slower. But it is
> certainly useful in a dev environment.
>
>


=====
Shankar Nagarajan,
Flat# S10, S11, 2nd Floor,
Etinasarva-2 Apts, Begur Road,
Bommanahalli, BANGALORE, KA, IN.
Cell: 91-98454-72242




__________________________________
Do you Yahoo!?
Yahoo! Mail - 250MB free storage. Do more. Manage less.
http://info.mail.yahoo.com/mail_250



Tue Jan 11, 2005 2:23 am

shanker_naga...
Offline Offline
Send Email Send Email

Forward
Message #112 of 500 |
Expand Messages Author Sort by Date

During development, I often want to quickly see if a table just successfully inserted a new record. In MySQL, a field can be used this way. Are there any...
Terrence Brannon
princepawn
Offline Send Email
Jan 11, 2005
1:23 am

The document says it works for 4.1.x or above. Create a table with timestamp column with default as current_timestamp so you can avoid the INSERT load. CREATE...
shanker nagarajan
shanker_naga...
Offline Send Email
Jan 11, 2005
2:23 am

... I prefer to count the number of rows before and after an operation instead of relying on the side effect of a change to hint that the right thing happened....
chromatic
chromatic_perl
Online Now Send Email
Feb 11, 2005
12:45 am

... Ditto. I also have a /very/ strong aversion to having my development environment and live environments differ. I want to have the same tests run in the...
Adrian Howard
ajh65537
Offline Send Email
Feb 11, 2005
3:01 pm

... Disclaimer: I code for an LDAP database, not a MySQL database. However, I think many principles still hold... Somehow, the natural thing to me would be to...
Ed Grimm
ed@...
Send Email
Feb 13, 2005
9:38 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help