I am trying to create a plugin that stores specific data and associates it with the postID in a table my plugin creates.
Currently my plugin adds some fields to the write a post page (under tags and categories). Once those are filled out, I use the publish_post hook. That seems to be the action I am looking for.. But whenever I try to use $wpdb->query to store what was in those fields, it seems to break. I get nothign but a white page. If I take the query out and just update options, or something else it works, but whenever I try to query the database (or call a function that queries the database) it breaks. Does anyone know what my problem is? Or where I can get some help on this action hook? Am I goign about this in the wrong way?
Any help would be much appreciated.