Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Aug 10th, 2018 59 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. Set row as another row - MySQL
  2. mysql_query("
  3.     UPDATE users SET
  4.  
  5.     `clicks_yesterday`=`clicks_today`,`clicks_today`=0)
  6.    
  7. UPDATE users SET clicks_yesterday = clicks_today;
  8. UPDATE users SET clicks_today = 0;
  9.    
  10. CREATE TABLE `duals` (
  11.   `one` int(11) DEFAULT NULL,
  12.   `two` int(11) DEFAULT NULL
  13. );
  14.  
  15. insert into duals values (1, 2);
  16.  
  17. select * from duals;
  18. +------+------+
  19. | one  | two  |
  20. +------+------+
  21. |    1 |    2 |
  22. +------+------+
  23.  
  24. update duals set one = two, two = 0;
  25.  
  26. select * from duals;
  27. +------+------+
  28. | one  | two  |
  29. +------+------+
  30. |    2 |    0 |
  31. +------+------+
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top