Advertisement
mikeyworx

ACTIVITY 4 ADASYS

May 10th, 2024
630
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 1.56 KB | None | 0 0
  1. CREATE DATABASE CUB_MSG;
  2. USE CUB_MSG;
  3.  
  4. CREATE TABLE messages (
  5.     id INT auto_increment primary KEY,
  6.     subject varchar(255),
  7.     body Text
  8. );
  9.  
  10. INSERT INTO messages (subject, body) VALUES
  11. ('CSS Workshop', 'Join us for a CSS Workshop where we will delve deep into the intricacies of Cascading Style Sheets.'),
  12. ('PHP Debugging Techniques', 'Learn advanced PHP debugging techniques in our upcoming workshop.'),
  13. ('Introduction to XHTML', 'Join our seminar on the basics of XHTML for web development beginners.'),
  14. ('CSS Flexbox Layouts', 'Discover the power of CSS Flexbox layouts in our hands-on session.'),
  15. ('PHP Security Best Practices', 'Master the best practices for securing your PHP applications.'),
  16. ('XHTML for SEO', 'Learn how to optimize XHTML documents for better search engine ranking.'),
  17. ('Advanced CSS Animations', 'Take your CSS animation skills to the next level with our advanced workshop.'),
  18. ('Database Integration', 'Learn how to integrate databases seamlessly into your PHP applications.'),
  19. ('XHTML Accessibility', 'Ensure accessibility compliance with XHTML standards.'),
  20. ('Responsive Web Design with CSS', 'Design responsive websites using the latest CSS techniques.'),
  21. ('PHP Only in Body', 'This message contains PHP in the body but not in the subject.'),
  22. ('Proposal Review', 'Review of the proposal for PHP project.');
  23.  
  24.  
  25. SELECT * FROM messages WHERE subject LIKE '%CSS%' AND body LIKE '%CSS%';
  26.  
  27. SELECT * FROM messages WHERE body LIKE '%PHP%' AND (subject NOT LIKE '%PHP%' OR subject IS NULL);
  28.  
  29. SELECT * FROM messages WHERE subject LIKE '%XHTML%';
  30.  
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement