January 2012
Generate Word Documents With PHP
boz — Sun, 01/29/2012 - 16:45
It turns out you have to do a lot of digging online to find some quality solutions for generating Microsoft Word documents in PHP. Both of these products have their quirks, but its usually all in how you setup your template.
PHP Word
http://phpword.codeplex.com/
This is a nice PHP library for updating doc and docx documents.
Delete CCK Inactive Fields
boz — Sat, 01/28/2012 - 07:08
Inactive fields occur when active fields controlled by a feature are deleted from the feature and the feature is reverted on a database where the fields deleted are currently active. Here's how to delete them.
$fieldname = "";
db_query('DELETE FROM {content_node_field} WHERE field_name = "%s"', $fieldname);
db_query('DELETE FROM {content_node_field_instance} WHERE field_name = "%s"', $fieldname);
