Re: Last Modified question..

From: Date: Fri, 31 Aug 2001 21:09:21 +0000
Subject: Re: Last Modified question..
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-12065@lists.php.net to get a copy of this message
Remember that the timestamp/default feature is only available to the 1st timestamp column in the table. This caught me a bit .. makes sense but if you don't know .. <G> DSig On Fri, 31 Aug 2001 09:20:50 -0500, remery@excel.com (Rick Emery) wrote: > >You can use a TIMESTAMP field in the the record. When you INSERT a record, >set the field to NULL; the time will automatically be entered. The same is >true for files/records that are UPDATED. > >CREATE TABLE mytable ( >first_name varchar(25) default "", >last_name varchar(25) default "", >bday date, >timestamp timestamp >) > >$query = "INSERT INTO mytable VALUES ($first,$last,NULL)"; >mysql_query($query); > >$query = "UPDATE mytable SET bday=$birthday WHERE last_name=$$last && >first_name=$first"; >mysql_query($query); > >rick > > >-----Original Message----- >From: Jay Paulson [mailto:jpaulson@lbjs.com] >Sent: Tuesday, August 28, 2001 5:04 PM >To: Justin Buist >Cc: PHP DB list (E-mail) >Subject: Re: [PHP-DB] Last Modified question.. > > >A) It's a MySQL database that I'm using >B) I'm using file_exsist() and to check the modified date I'm using >filemtime() >C) If I modify the permissions on the file wouldn't that possibly cause some >security issues? > >Thanks, >jay > >----- Original Message ----- >From: "Justin Buist" <jbuist@tridenttechnology.com> >To: "Jay Paulson" <jpaulson@lbjs.com> >Cc: "PHP DB list (E-mail)" <php-db@lists.php.net> >Sent: Tuesday, August 28, 2001 4:44 PM >Subject: Re: [PHP-DB] Last Modified question.. > > >> a) What kind of database is this? >> b) use fstat() to check the modification time on a specific file. >> c) You will have to modify permissions so that the user your web server >> runs as has 'read' permission on the file if you want to use fstat(). >> >> Justin Buist >> Trident Technology, Inc. >> 4700 60th St. SW, Suite 102 >> Grand Rapids, MI 49512 >> Ph. 616.554.2700 >> Fx. 616.554.3331 >> Mo. 616.291.2612 >> >> On Tue, 28 Aug 2001, Jay Paulson wrote: >> >> > I have a problem... I want to check the last modified time that a file >was >> > changed/updated. Actually, it's an employee database that I'm working >on >> > and I thought about just checking the last modified date on the file >that >> > the information was stored on. However, I get a permission denied error >and >> > I don't want to change the permissions of the file. Is there an easy >way to >> > check to see when the last time anyone logged in and updated their >> > 'employee' information? >> > >> > Thanks, >> > jay >> > >> > >> > -- >> > PHP Database Mailing List (http://www.php.net/) >> > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net >> > For additional commands, e-mail: php-db-help@lists.php.net >> > To contact the list administrators, e-mail: php-list-admin@lists.php.net >> > >> > > >-- >PHP Database Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net >For additional commands, e-mail: php-db-help@lists.php.net >To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#12065) next »