How To Connect To Database From ClipBucket Plugin

171 views October 18, 2016 October 18, 2016 Saqib Razzaq 0

You can easily connect to ClipBucket database form within plugin and perform all kinds of operations limitless. Here is how you can run any kind of query from plugin.

How to query database form plugins

global $db;
$data = $db->select(tbl('your_table_name_here'),'data_to_select','where_condition');

That’s how simple it is to connect to database from plugins. For more information, take a look at database class functions to see other options that are at your hands.

Was this helpful?