Skip to content

ThirteeNov

My personal blog about coding and internet

Menu
  • About me
  • About Zofia Kreasi
  • Cart
  • Checkout
  • Making an airplane game from scratch in Unity
  • My account
  • Privacy Policy
  • Privacy Policy – zkLeaderboard
  • Sample Page
  • Shop
  • Tutorials on Learning JavaScript
  • ZKAccounts – Privacy Policy
Menu

How to ride WordPress and use it’s database configurations to create our own tables and columns

Posted on March 7, 2021March 7, 2021 by Habibie

When making a WordPress plugin sometimes we need to do some database operations, such as making table, adding column, inserting new data, updating data and so on.

We can use current WordPress database connection that has been established before so we can just ride it.

To do mysqli query operations, PHP requires us a connection variable… We can use that one that WordPress uses. So for example if we want to do this command:

mysqli_query($connection, "Blablabla...

That $connections can be defined this way:

global $wpdb;
$connection = $wpdb->dbh

By having $connection variable, we can do any database operational thingies as we want, such as making database table, adding column, inserting, updating and so on…

Post Views: 369
ciihuy2020

Welcome!

  • My YouTube Channel
  • My GitHub Page
  • About me

Categories

  • 3DVista
  • Android
  • Apache
  • C#
  • Cordova
  • Electron & Node JS
  • HTML5, CSS & JavaScript
  • iOS
  • Let's Make Unity Games
  • Misc
  • Photoshop
  • PHP
  • Python
  • Uncategorized
  • Unity
  • WordPress

Recent Posts

  • Make objects like wires and cables easily in Unity using Ciihuy Curved Mesh
  • [SOLVED] Can’t Add Custom Domain to Blogger After Losing CNAME Verification
  • iOS App Icon Generator by CiihuyCom
  • Advanced Blinking Marker Script to show objects position in your game canvas
  • Ciihuy Images Merger – Fast & Easy Online Image Combiner
© 2025 ThirteeNov | Powered by Superbs Personal Blog theme