<?xml version="1.0" encoding="UTF-8"?>
<post>
  <body>Does anybody here know how wordpress maps its categories?

I've looked through the database, there's no key that I can find. The "post" table has a "categories" row but it's only populated with Zeros.

Anybody know where this information is at?

I will eventually figure it out, but I was hoping one of the dudes here might already have an idea.

For those of you who have no idea what any of this is about, but chose to visit my thread anyway, here is a kittah:
&lt;img src="http://icanhascheezburger.files.wordpress.com/2009/09/funny-pictures-cat-watches-scary-movie.jpg" /&gt;</body>
  <commented-at type="datetime">2009-09-15T17:11:46-04:00</commented-at>
  <comments-count type="integer">8</comments-count>
  <created-at type="datetime">2009-09-14T17:27:00-04:00</created-at>
  <disabled-at type="datetime" nil="true"></disabled-at>
  <flaggable type="boolean">true</flaggable>
  <flags-count type="integer">0</flags-count>
  <id type="integer">77041</id>
  <is-closed type="boolean">false</is-closed>
  <is-sticky type="boolean">false</is-sticky>
  <last-commenter-id type="integer">997</last-commenter-id>
  <person-id type="integer">997</person-id>
  <post-category-id type="integer">1</post-category-id>
  <title>Wordpress Category Question(server side code)</title>
  <updated-at type="datetime">2009-11-21T04:49:36-05:00</updated-at>
  <views-count type="integer">147</views-count>
  <comments type="array">
    <comment>
      <body>I could not halllppp... I failed. Anyone else want to help the good man? (aka BUMPPPP!)</body>
      <commentable-id type="integer">77041</commentable-id>
      <commentable-type>Post</commentable-type>
      <created-at type="datetime">2009-09-14T17:41:22-04:00</created-at>
      <id type="integer">2472281</id>
      <person-id type="integer">1514</person-id>
      <updated-at type="datetime">2009-09-14T17:41:22-04:00</updated-at>
    </comment>
    <comment>
      <body>No idea what you are on about but you have a nice pussy.</body>
      <commentable-id type="integer">77041</commentable-id>
      <commentable-type>Post</commentable-type>
      <created-at type="datetime">2009-09-14T17:43:47-04:00</created-at>
      <id type="integer">2472311</id>
      <person-id type="integer">12032</person-id>
      <updated-at type="datetime">2009-09-14T17:43:47-04:00</updated-at>
    </comment>
    <comment>
      <body>Thanks for the try dude!

Putting it out there: I'm not looking to manipulate wordpress code at all. I am writing a standalone script that is going to piggyback off of wordpresses database. I can't figure out how they handle categories though.</body>
      <commentable-id type="integer">77041</commentable-id>
      <commentable-type>Post</commentable-type>
      <created-at type="datetime">2009-09-14T17:43:59-04:00</created-at>
      <id type="integer">2472321</id>
      <person-id type="integer">997</person-id>
      <updated-at type="datetime">2009-09-14T17:43:59-04:00</updated-at>
    </comment>
    <comment>
      <body>I am glad that you like my pussy.</body>
      <commentable-id type="integer">77041</commentable-id>
      <commentable-type>Post</commentable-type>
      <created-at type="datetime">2009-09-14T17:46:23-04:00</created-at>
      <id type="integer">2472351</id>
      <person-id type="integer">997</person-id>
      <updated-at type="datetime">2009-09-14T17:46:23-04:00</updated-at>
    </comment>
    <comment>
      <body>May very well not be in database. I rember trying to butcher my textpattern cms db only to find that some stuff is stored in other code, like xml

</body>
      <commentable-id type="integer">77041</commentable-id>
      <commentable-type>Post</commentable-type>
      <created-at type="datetime">2009-09-14T17:52:23-04:00</created-at>
      <id type="integer">2472431</id>
      <person-id type="integer">7859</person-id>
      <updated-at type="datetime">2009-09-14T17:52:49-04:00</updated-at>
    </comment>
    <comment>
      <body>Yeah, I am thinking it's in the filesystem somewhere. Looking for it now.</body>
      <commentable-id type="integer">77041</commentable-id>
      <commentable-type>Post</commentable-type>
      <created-at type="datetime">2009-09-14T19:06:57-04:00</created-at>
      <id type="integer">2473231</id>
      <person-id type="integer">997</person-id>
      <updated-at type="datetime">2009-09-14T19:06:57-04:00</updated-at>
    </comment>
    <comment>
      <body>Maybe this might help. 

&lt;a href="http://codex.wordpress.org/images/8/83/WP_27_dbsERD.png"&gt;&lt;img src="http://codex.wordpress.org/images/8/83/WP_27_dbsERD.png" /&gt;&lt;/a&gt;

It might use a different naming convention. wp_terms might be a good place to start. I'll be on chat later if you need to talk Nick. Wordpress is not as xml reliant as some of the other CMS out there.

Now look what you did, made me sound geeky. haha. ;)</body>
      <commentable-id type="integer">77041</commentable-id>
      <commentable-type>Post</commentable-type>
      <created-at type="datetime">2009-09-15T09:43:29-04:00</created-at>
      <id type="integer">2481421</id>
      <person-id type="integer">303</person-id>
      <updated-at type="datetime">2009-09-15T09:48:21-04:00</updated-at>
    </comment>
    <comment>
      <body>I know what you're saying, and thank you for the diagram, but I have been through the database. There is a "post_category" column, but it's just set to the default value. I have also thoroughly browsed the DB looking for any patterns I could relate to the simple categories structure. It's jut not in there. :\

I have been all up in that crap with PHPMyAdmin. I think I'm just going to include the wp_load.php file in my script and use the regular wordpress calls to manipulate categories for me. Seems simple enough.</body>
      <commentable-id type="integer">77041</commentable-id>
      <commentable-type>Post</commentable-type>
      <created-at type="datetime">2009-09-15T17:11:46-04:00</created-at>
      <id type="integer">2488521</id>
      <person-id type="integer">997</person-id>
      <updated-at type="datetime">2009-09-15T17:11:46-04:00</updated-at>
    </comment>
  </comments>
</post>
