Independent Booksellers

Maybe things are starting to pick up a little bit for independent booksellers, according to Bookseller. Lots of them have been put out of business by Oxfam’s book-selling. Quite a quandary – support your local economy and businesses or give to charity, for other countries?

Posted in Uncategorized | Tagged | Comments Off

E-mail Results of MySQL Query with PHP

I was in need of a simple house-keeping script, but couldn’t find anything simple. So I knocked this, simplified, up:


<?php
$to = 'to@me.com';
$subject = 'SQL results';

$headers = 'From: me@me.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

$dbname = 'name'; // The name of the database
$dbuser = 'user'; // Your MySQL username
$dbpass = 'password'; // ...and password

mysql_connect("localhost",$dbuser,$dbpass);
mysql_select_db($dbname) or die( "Unable to select database");

$query = "select 1 as id, 2 as name, 3 as something";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();

$i=0;
$message = "";
while ($i < $num)
{
$id=mysql_result($result,$i,"id");
$name=mysql_result($result,$i,"name");
$something=mysql_result($result,$i,"something");

$message.= $id. " ". $name . " " . $something . "\n";
$i++;
}

if ($num > 0)
{
mail($to, $subject, $message, $headers);
}
?>

Replace variables with suitable values!

Posted in Dev | Tagged , , | Comments Off

Tinkering

Tinkering with a couple of WordPress plugins at the moment: FlickrRSS, WPTouch (for mobile devices) and Exec-PHP.

I’ve also changed the header image, which I do whenever I feel inspired. Or remember, whichever.

Also added a link to my bookshop on the right hand side. Please give me constructive feedback, if you feel so inclined.

Posted in Uncategorized | Tagged | Comments Off

GPS Route of Short Walk

Here’s a Google Earth link file, to the short walk I did today. I’m doing some experiments with iPhone GPS software. This one was done with MotionX-GPS.

Posted in Uncategorized | 3 Comments

Weather

It’s been raining since Saturday. Yesterday was a brief respite, but only for a while.

Made a nice £16 profit on one of my books that I sold – my site is almost ready to open; I’ve got Google Checkout working, though my only worry is that most people trust Paypal – would you buy something via G.C?

Posted in Uncategorized | Tagged , | 3 Comments

Make an Album Cover

Create your own album cover

1 – Go to “wikipedia.” Hit “random”
or click http://en.wikipedia.org/wiki/Special:Random
The first random wikipedia article you get is the name of your band.

2 – Go to “Random quotations”
or click http://www.quotationspage.com/random.php3
The last four or five words of the very last quote of the page is the title of your first album.

3 – Go to flickr and click on “explore the last seven days”
or click http://www.flickr.com/explore/interesting/7days
Third picture, no matter what it is, will be your album cover.

4 – Use photoshop or similar to put it all together.



Mine: “Hirsutella – you do after you arrive.”
Album Cover

Album Cover

Feel free to post your own, or e-mail me your masterpiece and I’ll post it here. My address shouldn’t be too hard to work out from the URL of this site.

Posted in music | Tagged | 1 Comment

William Fitzsimmons

Saw William Fitzsimmons do a gig last night in Cardiff, at 10 Feet Tall. It was really good, though the acoustics weren’t too hot as couldn’t make out some of the words from his songs. He was accompanied by a great guitarist called Justin Shaw, I think.

If you’re into melancholic folk music, like me, then give him a listen.

Posted in music | Comments Off

Cheaper Printer Cartridges

I’ve just got a Canon MP620 printer and there’s no way I’m going to spend £10 to get just one cartridge. I did a bit of searching around and found these two sites:

StinyInk
and
Advantage Online

I’ve used StinkyInk: next day delivery and cartridges are 50% cheaper than the Canon ones. There’s no discernible difference in the print quality. I’ve heard good things about A.O as well.

Posted in Uncategorized | Tagged , , | Comments Off

Progress

I’ve now sold three (woo) books via Amazon. I can’t say that I’ve made much of a profit, but I need to build my profile up by selling some books at silly prices. There’s no money in popular fiction; the big margins are in rarer books and non-fiction.

It’s a start nonetheless. Need to supplement income by doing some PC repairs and small-scale software development (blogs etc).

Posted in Uncategorized | 3 Comments

Self-employed

I’m now self-employed. Gulp.

My new business name is Hook Book. There is a website live, but not ready for public viewing yet.

Posted in Uncategorized | 2 Comments