WordPress database error: [Can't open file: 'wp_comments.MYD'. (errno: 144)]
SELECT ID, COUNT( comment_ID ) AS ccount FROM wp_posts LEFT JOIN wp_comments ON ( comment_post_ID = ID AND comment_approved = '1') WHERE ID IN (80) GROUP BY ID

Curioso! » 2005 » November


Archive for November, 2005

Select random picture

Thursday, November 24th, 2005

The following command selects a random picture from the directory for the current year, copies it to the file random.jpg and stores the path in file.txt.

#!/bin/sh
cd $HOME/public_html/images
year=`date +\"%Y\"`
file=`/usr/X11R6/bin/xscreensaver-getimage-file --name $year`
cp $file random.jpg
echo $file > file.txt

It can be used to generate a random background image by e.g. running it as a hourly cron job.

WordPress database error: [Can't open file: 'wp_comments.MYD'. (errno: 144)]
SELECT COUNT(comment_ID) FROM wp_comments WHERE comment_post_ID = 80 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_comments.MYD'. (errno: 144)]
SELECT COUNT(*) FROM wp_comments WHERE comment_post_ID = '80' AND comment_approved = '1'

No Comments »