Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Go Back   Code Forums > Application and Web Development > PHP
User Name
Password

Reply
 
LinkBack Thread Tools Display Modes
Old 06-26-2007, 08:18 AM   #1 (permalink)
metazai
Regular Contributor
 
Join Date: Apr 2004
Location: Orange County, CA
Posts: 120
metazai is on a distinguished road
Timestamp -- sequential?

And heeeere's funky little question. The UNIX timestamp produced in MySQL -- is it sequential? In other words, could I use it to sort date/time events simply by asking which number is bigger?
__________________
metazai is offline   Reply With Quote
Old 06-26-2007, 09:48 AM   #2 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,680
redhead is on a distinguished road
Yes it is sequential, but how can you be sure two seperate users dosnt submit within the same second?
for this an auto_increment index number is essential.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 06-26-2007, 10:01 AM   #3 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
sde is on a distinguished road
Quote:
Originally Posted by redhead View Post
Yes it is sequential, but how can you be sure two seperate users dosnt submit within the same second?
for this an auto_increment index number is essential.
good point, but he may also be talking about a record where the date could be updated, in which an increment field wouldn't work.
__________________
testing 1 2 3
sde is offline   Reply With Quote
Old 06-26-2007, 10:33 AM   #4 (permalink)
metazai
Regular Contributor
 
Join Date: Apr 2004
Location: Orange County, CA
Posts: 120
metazai is on a distinguished road
You're both right. Regardless, I'm going another way with it.

=+)

Thanks for the quick replies!
__________________
metazai is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
wants help from PHP experts to add bar chart functionality in exsisting site......... jameswatt PHP 1 09-22-2005 08:12 AM
windows timestamp format? sde Windows 4 07-18-2003 12:09 PM
Converting MySQL Timestamp to a Unix Timestamp sde PHP 0 02-16-2003 11:59 PM


All times are GMT -8. The time now is 05:02 PM.


Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2006, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
Open Circle