[wp-hackers] $wpdb query
ryanfitzer at gmail.com
Wed Sep 20 02:54:42 GMT 2006
Thanks for the help. It is the SQL that I'm having trouble with but your
explanation helped in other ways. Here is what I've used for a subpage
$wpdb->query("UPDATE $wpdb->posts SET post_parent = 3 WHERE post_ID =
4 AND post_status = 'static'");
Got no results from this. And no clue what the query would look like with a
On 9/19/06, Robin Adrianse <shorty114 at shorty114.net> wrote:
> Like you said, I'm not sure if this is the best place for a request like
> this, but here's my answer:
> Categories: A category is made a subcategory by setting category_parent to
> something other than 0, namely the ID of the category which is its parent.
> If it is 0, then it will just be handled as a root category (no parents).
> you can't figure out the SQL for this, feel free to ask.
> Pages: First off, a page is differentiated from a post by the setting of
> post_status. Pages always have it set to "static" (without quotes, of
> course), and posts can have it published, draft and private. That said, a
> page is made a sub-page similarly to a category. There is a field
> post_parent which is the ID of the page's parent. If it is 0, it is a
> root-level page.
> I hope this answered your questions.
> On 9/19/06, ryan fitzer <ryanfitzer at gmail.com> wrote:
> > Tried the forums but I'm not sure if that's the place for it.
> > Anyone know the query to add a sub-category and a sub-page in
> > I
> > want to be able to use it to do auto set-ups for custom themes. Any help
> > would be great.
> > I'm also trying this for WordPress MU for a different project.
> > I've successfully added an extra category, post and page. I'm so close!
> > Thanks for any help.
> > --
> > Ryan Fitzer
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers