because sometimes I'm just fucking right
Jun 21
2010

OK, so the question marks may have (probably) came from when I upgraded from MySQL 4 to MySQL 5 not from the WordPress upgrade.  I just didn’t notice when I did the upgrade.  It was a quick thing.  Anyway, I confirmed that the data in the field was actually a question mark combined with another character and then whipped up a simple PHP script to fix it all.  I’ve managed to fix most of the issues but not all.  There are some posts that I may have to edit by hand or just ignore. Oh, and the code below assumes the Zend Framework is in your path.


require_once 'Zend/Loader/Autoloader.php';
$autoloader = Zend_Loader_Autoloader::getInstance();

$db = new Zend_Db_Adapter_Pdo_Mysql(array(
        'host' => 'NOPE',
        'username' => 'NOPE',
        'password' => 'NOPE',
        'dbname' => 'NOPE'));

$sql = 'SELECT ID, post_content FROM wp_posts where post_content like \'%.?%\'';

$result = $db->fetchAll($sql);

$table='wp_posts';

foreach ($result as $row)
{
    $newContent = str_replace('.?', '.', $row['post_content']);
    $wheres = array("ID={$row['ID']}");
    $params = array('post_content' => $newContent);
    $db->update($table, $params, $wheres);
}
 
Jul 03
2009
posted by Mike in Blog

As evidenced by my lack of writing the past year and several other blogs that I used to follow, the personal blog seems officially dead. No one seems to have the time or energy to update their personal blogs on a daily basis anymore. Facebook and Twitter status updates have taken the place of the long, utterly boring diatribes of days gone by. Is this a good thing or have we sentenced ourselves to a literary loss of epic proportions? Yeah, right. :)

So, obviously I’m not writing anymore. This begs the question: what am I going to do with this website? At this point, I haven’t decided. I will keep this blog up as the main page for now but it will eventually be relegated to a sub folder of the site. What will be on the main page I have no idea. I honestly have no idea. It may just stay a forlorn forgotten blog. We’ll just have to wait and see.

-michael

 
Jan 16
2007

I have a rather sick and twisted mind and sometimes it comes up with the most absurd ideas. Today’s idea was this. Who would you call if you accidentally (or on purpose) killed someone and needed to cover it up? Is there anyone in your life you could trust that much? Is there anyone who wouldn’t bat an eye but would instead calmly ask where you kept the hack saw?

Now this was an interesting concept for me. I thought long and hard on what the answer would be. I have 3 friends who I’ve known since childhood and they are the closest thing to brothers I’ll have ever have. Does that mean I’d call them? At first, I thought, “Absolutely!” They’d have my back. And in the initial stages, I honestly think they would. Each of them would be there with the hacksaw, ready to go. But the more I thought about it, the more I realized I probably wouldn’t call any of them. One is too damn honest. In the end I think he’d have to tell the truth. I view this as a strength of his, by the way. Certainly not a weakness. Another would be so torn with guilt that he’d end up telling random strangers until we were all thrown in jail. Again, not a weakness. An active conscience is a good thing. The third is more complicated. I think he’d go along with whatever I needed and I also think he would keep quiet. The problem with him is that I think it would slowly break his sense of self; his sense of purpose; his belief in the innate goodness of man and himself and I just couldn’t be responsible for that. So, in the end, when I accidentally kill someone, I’m pretty much on my own. That was kind of a bummer at first. And then it got me thinking about something else. Would someone call me?

I did an intense internal audit while at the grocery store this evening. Could I live with the guilt of hacking up and disposing of a body? Probably so. It’d take some getting used to but I don’t think it’d be all that horrendous. Could I keep my mouth shut? Absolutely. There are some things you just don’t talk about and that would be one of them. And finally, would it change my own self-worth? Would it change how I view myself? Would it make me feel less of a man? Honestly, I don’t think so. I’ve got a dark side that I accepted a long time ago. One of my best friends said of me once, “Mike, everyone has a dark side. You just acknowledge and embrace yours.” It fits to a tee. I think part of it is that I accept who I am and am not afraid of what I could become.

So, would I be a good person to call in this situation? That just depends on how much I like you.

 
Nov 30
2006

So I’ve spent the past day or so working up this new theme for my blog. I called it fried-green for no good reason other than it’s green and it’s for friedcherries.org. I’m pretty creative aren’t I?

What’s sad is that I’ve spent so much time making the site look nice but I very rarely use the site. Again, I’m going to try and use it more but we’ll see. Anyway, enjoy the new look and feel and let me know what you think.

? -mike

 
Sep 27
2006
posted by Mike in Blog, Movies

“What new layout?” you’re saying right now. Well, because I’m so cool, I dumped all the html tables that my pathetic WordPress theme was using and it’s now all 100% CSS driven for layout and beautifying. There’s still a few kinks to work out like spacing between posts and such but I’ve run out of steam for the evening. Plus, I’ve only tested it in Firefox and IE so there’s no guarentees that it looks good on any other browser. :)