Project

wpdb

0.0
No commit activity in last 3 years
No release in over 3 years
Wrapper for Wordpress DB
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0

Runtime

 Project Readme

Wpdb

An Active Record wrapper for the Wordpress Database

require 'active_record'
require 'wpdb'

ActiveRecord::Base.establish_connection(
  :adapter  => 'mysql',
  :host     => 'localhost',
  :port     => 3306,
  :username => 'root',
  :password => '',
  :database => 'your_db_name'
)

wp_post = Wpdb::WpPost.posts.last
puts wp_post.post_title
puts wp_post.wp_comments.count
puts wp_post.wp_categories
puts wp_post.wp_tags