WordPress database

1,024 views

Published on

Cebu WordPress Meetup

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,024
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
10
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

WordPress database

  1. 1. WORDPRESS MEETUP CEBU OCT. 5 ,2013 Tuesday, October 8, 13
  2. 2. HOW WORDPRESS WORKS Tuesday, October 8, 13
  3. 3. HOW WORDPRESS WORKS Tuesday, October 8, 13
  4. 4. HOW WORDPRESS WORKS Tuesday, October 8, 13
  5. 5. HOW WORDPRESS WORKS Tuesday, October 8, 13
  6. 6. HOW WORDPRESS WORKS Tuesday, October 8, 13
  7. 7. HOW WORDPRESS WORKS Tuesday, October 8, 13
  8. 8. HOW WORDPRESS WORKS Tuesday, October 8, 13
  9. 9. HOW WORDPRESS WORKS Tuesday, October 8, 13
  10. 10. HOW WORDPRESS WORKS Tuesday, October 8, 13
  11. 11. HOW WORDPRESS WORKS Tuesday, October 8, 13
  12. 12. HOW WORDPRESS WORKS Tuesday, October 8, 13
  13. 13. QUICKTOURTO WORDPRESS DATABASE Tuesday, October 8, 13
  14. 14. Tuesday, October 8, 13
  15. 15. WHY WOULD I USE WPDB? Tuesday, October 8, 13
  16. 16. WHY WOULD I USE WPDB? 1. custom database queries Tuesday, October 8, 13
  17. 17. WHY WOULD I USE WPDB? 1. custom database queries 2. when using a plugin Tuesday, October 8, 13
  18. 18. WHY WOULD I USE WPDB? 1. custom database queries 2. when using a plugin 3. simplifying and optimizing server loads Tuesday, October 8, 13
  19. 19. WHY WOULD I USE WPDB? 1. custom database queries 2. when using a plugin 3. simplifying and optimizing server loads 4. it’s easy to maintain and flexible Tuesday, October 8, 13
  20. 20. WHY WOULD I USE WPDB? 1. custom database queries 2. when using a plugin 3. simplifying and optimizing server loads 4. it’s easy to maintain and flexible 5. makes you a better WP developer Tuesday, October 8, 13
  21. 21. WORDPRESS DATABASE WORDPRESS DATABASE CLASS - WPDB codex.wordpress.org/Function_Reference/wpdb_Class Tuesday, October 8, 13
  22. 22. WORDPRESS DATABASE WORDPRESS DATABASE CLASS - WPDB codex.wordpress.org/Function_Reference/wpdb_Class C R U D Tuesday, October 8, 13
  23. 23. WORDPRESS DATABASE WORDPRESS DATABASE CLASS - WPDB codex.wordpress.org/Function_Reference/wpdb_Class C R U D reate Tuesday, October 8, 13
  24. 24. WORDPRESS DATABASE WORDPRESS DATABASE CLASS - WPDB codex.wordpress.org/Function_Reference/wpdb_Class C R U D reate read Tuesday, October 8, 13
  25. 25. WORDPRESS DATABASE WORDPRESS DATABASE CLASS - WPDB codex.wordpress.org/Function_Reference/wpdb_Class C R U D reate read pdate Tuesday, October 8, 13
  26. 26. WORDPRESS DATABASE WORDPRESS DATABASE CLASS - WPDB codex.wordpress.org/Function_Reference/wpdb_Class C R U D reate read pdate elete Tuesday, October 8, 13
  27. 27. CREATE $wpdb->insert( ! 'table', ! array( ! ! 'column1' => 'value1', ! ! 'column2' => 123 ! ), ! array( ! ! '%s', ! ! '%d' ! ) ); Tuesday, October 8, 13
  28. 28. READ $mypost = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID = 10"); echo $mypost->post_title; Tuesday, October 8, 13
  29. 29. UPDATE $wpdb->update( ! 'table', ! array( ! ! 'column1' => 'value1',! // string ! ! 'column2' => 'value2'!// integer (number) ! ), ! array( 'ID' => 1 ), ! array( ! ! '%s',! // value1 ! ! '%d'!// value2 ! ), ! array( '%d' ) ); Tuesday, October 8, 13
  30. 30. DELETE // Default usage. $wpdb->delete( 'table', array( 'ID' => 1 ) ); // Using where formatting. $wpdb->delete( 'table', array( 'ID' => 1 ), array( '%d' ) ); Tuesday, October 8, 13
  31. 31. QUESTIONS? Feel free to ask anything regarding WordPress or web development in general. Tuesday, October 8, 13
  32. 32. WORDPRESS CEBU Tuesday, October 8, 13

×