WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY year(post_date), month(post_date), dayofmonth(post_date)' at line 1]
SELECT DISTINCT post_date FROM wp_posts LEFT JOIN wp_post2cat ON (wp_posts.ID = wp_post2cat.post_id) LEFT JOIN wp_categories ON (wp_post2cat.category_id = wp_categories.cat_ID) WHERE 1=1 AND category_id IN (26) AND (post_type = 'post' AND (post_status = 'publish')) AND ID NOT IN (165,157,166,172,174,190,204,202,212,214) GROUP BY wp_posts.ID GROUP BY year(post_date), month(post_date), dayofmonth(post_date)

Archive for the 'Learned' Category
23
Mar

One of the big complaints I had about EE out of the box was that comments and trackbacks only appear on the www.blog.com/comments/(blog entry) page, but not www.blog.com/(blog entry). For a bit, I’d set up the non-comments page to display a link to the full comments page, but this was a clumsy solution to a larger problem.

THEN: I figured out that I could just test against segment_1 at the bottom of each post. So: If the first URL segment equals the title of the blog entry (meaning www.blog.com/(title)), the comments and trackbacks appear.

Voila.

(PS: Learned Today is temporarily discontinued until I get some free time/learn some things)

17
Mar
Learned and Politics.  | 

I totally forgot about this guy until I saw him on the Indecision 2004 DVDs:

Bob Graham’s campaign trademark was to work a full, eight-hour day at various jobs which represented Florida’s constituents. He began his Workdays in 1974, teaching a semester of civics at Miami Carol City Senior High School in Miami while serving in the Florida Senate. At that time, Bob Graham was on the Education Committee. After a speech, M. Sue Riley, an English teacher at Carol City, approached Bob Graham and said, “The only problem with members of the Education Committee is nobody has any experience in education.” Bob Graham was taken aback at that assertion and asked, “Well, what can I do about that?” A few months later, Ms. Riley contacted Senator Graham with a proposal to teach the next semester of civics. Following that teaching experience, he performed 99 additional workdays just in time for his 1986 successful campaign for U.S. Senate. Since then, he has completed 386 workdays, more than a year’s worth of days spent laboring side-by-side with his constituents. Graham has continued doing workdays throughout his tenure as governor and in the United States Senate. His jobs have included service as a police officer, busboy, railroad engineer, construction worker, fisherman, garbageman, factory worker, and teacher. On No. 365, he checked in customers, handled baggage and helped serve passengers on US Airways.

17
Mar

My main complaint about EE is that, as a total noob, I can’t easily figure out how to do away with the /comments URL and put the comment functionality on the post page itself. I’ve set up all the Viget.com and blog links to direct to /comments, so users who click on the title end up reading the full post with comments.

With this came another issue: We have a setup that shows a mix of summary, body, and extended depending on how you’re reading, and the only way I could figure out to show Body and Extended together was to test for the url_segment “comments.” So, /comments looked fine, the main blog page looks fine, the categories look fine…

But there’s still the nagging issue of the actual post’s URL. Even though there are no links to the direct URL title, there are bound to be cases where comments gets trimmed off or redirects don’t work perfectly, and the user gets treated to half a post (in the case of summary or extended articles) with a “continue reading” link.

ANYHOW, I figured out that this little guy:

{if segment_2 == url_title }

is the easy way to test if a user’s on the actual entry or not, and I can display the extended post with a comment count for easy navigatin’.

I know, it’s really simple, but it is all I learned today.

15
Mar
Learned.  | 

Although the concept of dementia goes as far back as the ancient Greek and Roman philosophers and physicians, it was in 1901 when Alöis Alzheimer, a German psychiatrist, identified the first case of what became known as Alzheimer’s disease.

Also, totally great author Terry Pratchett has a rare form of the disease, which is sad and alarming. He’s just given a million dollars to searching for a cure, and some nice people on the Livejournal are trying to match his donation.

15
Mar
Learned.  | 

Over 1200 species of insects are used as food by people throughout the world. Commonly eaten insects and arachnids include grasshoppers, crickets, termites, ants, beetle larvae (grubs), moth caterpillars and pupae, spiders, tarantulas, and scorpions.

The consumption of Hormiga culona (literally “fatass ant”) Atta laevigata is traditional in Colombia; they are served at movie theaters in addition to popcorn. In some places the commercial exploitation of food insects has led to their decline

Insects generally have a higher food conversion efficiency than more traditional meats. For example, studies concerning the house cricket (Acheta domesticus), when reared at 30°C or more and fed a diet of equal quality to the diet used to rear conventional livestock, show a food conversion twice as efficient as pigs and broiler chicks, four times that of sheep, and six times higher than steers when losses in carcass trim and dressing percentage are counted.