wordpress 的 schema

ver 2.7:

wp_2.7

幾個查詢例:

SELECT m.* FROM  wp_posts  p , wp_postmeta m
where p.id=m.post_id
order by post_id desc


SELECT tr.* 
FROM  wp_posts  p , wp_term_relationships tr  
where p.id=tr.object_id
order by p.id desc


SELECT p.id , w.*
FROM  wp_posts  p , wp_term_relationships tr , wp_term_taxonomy t
where p.id=tr.object_id
and tr.term_taxonomy_id=t.term_taxonomy_id
order by p.id desc


SELECT p.id , w.*
FROM  wp_posts  p , wp_term_relationships tr , wp_term_taxonomy t ,  wp_terms w
where p.id=tr.object_id
and tr.term_taxonomy_id=t.term_taxonomy_id
and t.term_id = w.term_id
order by p.id desc

裝了 SyntaxHighlighter Plus , 程式碼可以看清楚了

SyntaxHighlighter Plus

It supports the following languages (the alias for use in the post is listed next to the name):

* Bash — bash, sh
* C++ — cpp, c, c++
* C# — c#, c-sharp, csharp
* CSS — css
* Delphi — delphi, pascal
* Java — java
* JavaScript — js, jscript, javascript
* PHP — php
* Python — py, python
* Ruby — rb, ruby, rails, ror
* SQL — sql
* VB — vb, vb.net

* XML/HTML — xml, html, xhtml, xslt

修改 … /wp-content/plugins/syntaxhighlighter-plus/shlfiles/SyntaxHighlighter.css
把 .dp-highlighter 的 width 改成想要的寬度

[code language=C]
#include
main() {
printf(“Hello World!”);
}

[/code]