Adsense
Popular Posts
- Code update from PHP 7.4 to PHP 8.1 - PhpSpreadsheet
- MySQL workbench -"Could not decrypt password cache"
- Code update from PHP 7.4 to PHP 8.1 - Worksheet/Iterator.php
- Rendering HTML tags inside textarea
- axios handle blob type data
- Unix Utils and wget in Windows
- increase mysql query speed
- Setup vi syntax for PHP
- Get WAMP running on EC2
- EXCEL return to the next line in the same cell
Saturday, November 22, 2014
Javascript - get unique number from time
To get unique number from time
var d = new Date();
var n = d.valueOf();
which will return
1416718344714
in MySQL, we need to set the data type as BIGINT( 20 ).
In jQuery ajax post, we can get the last insert number from autoincrement from retrun message.
But it is sometimes diffcult to syncronize this number to the div I want to update.
In some application, we had better create a unique number from time and force
the last insert number as this unique number in ajax post.
Labels:
javascript
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment