scbFramework: Version 1.2

When you need to create a new database table, all you should be thinking about are the table columns, right? Well, with the new scbTable class added in version 1.2, you can.

Creating a table is as easy as:

new scbTable('my_table', __FILE__, "
	id bigint(20) unsigned NOT NULL default 0,
	foobar varchar(100) NOT NULL,
	PRIMARY KEY  (id),
");

The class takes care of creating or updating the table structure, as necessary.

Also, you can access it with $wpdb->my_table, just like you would any other WordPress table.

comments powered by Disqus