Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Set row as another row - MySQL
- mysql_query("
- UPDATE users SET
- `clicks_yesterday`=`clicks_today`,`clicks_today`=0)
- UPDATE users SET clicks_yesterday = clicks_today;
- UPDATE users SET clicks_today = 0;
- CREATE TABLE `duals` (
- `one` int(11) DEFAULT NULL,
- `two` int(11) DEFAULT NULL
- );
- insert into duals values (1, 2);
- select * from duals;
- +------+------+
- | one | two |
- +------+------+
- | 1 | 2 |
- +------+------+
- update duals set one = two, two = 0;
- select * from duals;
- +------+------+
- | one | two |
- +------+------+
- | 2 | 0 |
- +------+------+
Add Comment
Please, Sign In to add comment