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! » Blog Archive » Select random picture


Select random picture



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 * FROM wp_comments WHERE comment_post_ID = '80' AND comment_approved = '1' ORDER BY comment_date

Leave a Reply