List:General Discussion« Previous MessageNext Message »
From:Douglas Brantz Date:March 11 2000 6:23am
Subject:Help!! Time Alter Question?
View as plain text  
Help!!!
I would like to allow a person to alter the time field in a form.  What
is the best way to present the info to the user without writing a very
long script?

Here is how I usually present a time field in perl-cgi.

my $sth = $dbh->Query("select date_format(tdout, '%W %M %D %Y %r') from
timedata where timeid=\"$newtimeid\" ")
or die $Mysql::db_errstr;
while (@record = $sth->FetchRow)  {
$fool = $record[0]; $bar = $record[1];
}
print "$fool</td></tr><td align=right>";

So, I would like to alter this time info in a form. Would I have to call
each part one at a time, such as %W and create a drop down menu of all
the Days of the week? and then after all that how can I put it all back
together again and give the command TIME TO SEC and also Update Mysql
with the new TIMESTAMP?

I'm probably making it more difficult than it is.

Thanks in advance.

Douglas
ASU

Thread
Help!! Time Alter Question?Douglas Brantz11 Mar
  • Re: Help!! Time Alter Question?Douglas Brantz11 Mar