Skip to content

Instantly share code, notes, and snippets.

@michaeltwofish
Created June 6, 2011 23:14
Show Gist options
  • Save michaeltwofish/1011330 to your computer and use it in GitHub Desktop.
Save michaeltwofish/1011330 to your computer and use it in GitHub Desktop.
object SuperGlobal Object
(
[vocabulary] => Array
(
[tags:term] => Array
(
[0] => jdlfjks
)
)
[nolimit] => 1
[content_type] => 1
[status] => 2
)
string get_results
string
SELECT DISTINCT {posts}.id AS id, {posts}.slug AS slug, {posts}.title AS title, {posts}.guid AS guid, {posts}.content AS content, {posts}.cached_content AS cached_content, {posts}.user_id AS user_id, {posts}.status AS status, {posts}.pubdate AS pubdate, {posts}.updated AS updated, {posts}.modified AS modified, {posts}.content_type AS content_type
FROM {posts}
JOIN {object_terms} ON {posts}.id = {object_terms}.object_id
JOIN {terms} ON {object_terms}.term_id = {terms}.id
JOIN {vocabularies} ON {terms}.vocabulary_id = {vocabularies}.id
WHERE ( ({posts}.status = ? AND {posts}.content_type = ? AND {vocabularies}.name = ? AND {terms}.term IN ( ? ) AND {object_terms}.object_type_id = ?) ) AND (
((1=1))
) ORDER BY pubdate DESC
array Array
(
[0] => 2
[1] => 1
[2] => tags
[3] => jdlfjks
[4] => 0
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment