Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.
CREATE TABLE `note` ( `id` char(36) NOT NULL, `body` text CHARACTER SET utf8mb4, `title` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL, `preview` text CHARACTER SET utf8mb4, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `user` varchar(34) DEFAULT NULL, `conversation` varchar(34) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
The first query can be alternatively thought of as where conversation, user in ("cid", "uid");
select * from note where (conversation="cid" and user="uid") or (conversation="uid" and user="cid" order by updated desc; select * from note where conversation = "cid" order by updated; select * from note where user="uid" and conversation is not null order by updated desc; select * from note where id="id";
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.