Total members 9950 | Gratitudes |It is currently Sat Feb 11, 2012 3:00 am Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 3 posts ] 
Author Question
 Question subject: DYNAMIC DATES IN MYSQL
PostPosted: Fri Jun 12, 2009 3:05 am 
Offline
Newbie
User avatar

Joined: Tue Apr 28, 2009 10:05 am
Posts: 4
Has thanked: 0 time
Have thanks: 0 time

Hai,
i want to design a database with fields name,currentdate and nextdate. This currendate and nextdate should be the actual date. It should be dyanmic also. I'm working in JSP and MySql. Is that possible to create such a database??? I don't want to store the dates into my table. I want the dates to be my fields in my table. Is that possible?? If anyone knows the answer, plz help me.....


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: DYNAMIC DATES IN MYSQL
PostPosted: Sat Aug 29, 2009 2:59 am 
Offline
Mastermind
User avatar

Joined: Tue Mar 27, 2007 10:55 pm
Posts: 2103
Location: Earth
Has thanked: 39 time
Have thanks: 56 time
Code:
CREATE TABLE pet (name VARCHAR(20), owner VARCHAR(20),
      species VARCHAR(20), sex CHAR(1), birth DATE, death DATE);

_________________
Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: DYNAMIC DATES IN MYSQL
PostPosted: Thu Sep 03, 2009 10:09 am 
Offline
Newbie
User avatar

Joined: Thu Sep 03, 2009 10:07 am
Posts: 1
Has thanked: 0 time
Have thanks: 0 time
I am a relative newbie for php/MySQL, and most of what
I am doing is based on being self-taught using someone else's
well-written code, and my own googling the answers to my questions.

I'm doing a php/MySQL page that reads data out of a MySQL database.
Longer term, I'll do a data-entry screen allowing me to modify the
database or add new records. For now, I'm just using phpmyadmin to data
enter stuff.

Is there a way to set up a date field, Last_Update, that would
automatically update to today's date any time a record was added or
changed using phpmyadmin?

Not sure if I'm asking the question clearly. What I want would be that,
let's say that I add a new record today, April 23. The Last_Update
field for the record would automatically be April 23. If I go in and
modify and part of that record on April 29, Last_Update automatically
changes to April 29 for that record.


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 3 posts ] 
Quick reply


  


 Similar topics
 Topic title   Forum   Author   Comments 
 delete duplicate rows in mysql using php  PHP Tutorials  msi_333  2
 Dynamic Frame-sets with java script protocols  Scripting Language  Anonymous  1
 find the difference between dates in asp.net  ASP/ASP.net examples  msi_333  0
 dynamic crystal report generation  ASP.NET  AskBot  3
 Calendar dates program: Please help!  Java  purplejpp  0

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 1 guest



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team