Ever forget someones email address that you have previously emailed? Want to know the address? In Apples Mail.app you can goto =>Window =>Previous Recipients … and a list of all the email addresses that you’ve sent emails to should appear in a window.
iDVD bug – App hangs when authoring audio
I just used iDVD for the first time in a long time on my new MacBook Pro (I’m a Final Cut, DVD Studio Pro guy). I was authoring a fairly large video (about 90min), with audio, motion menus, and audio menus. Everything went fine until It started to author the audio from the video. As soon as it started it hung up and I got the death ball. Well it’s apparently just a bug so I left it for a while and it finally went through. Apparently a ton of others have been having the same problem. Hope this helps someone out.
Understanding How Joins Work
Mike Nixon sent me this link that does a pretty sweat job of describing how the different types of joins work when playing with a database.
Deleting a file in php using unlink
Tonight I was having troubles deleting a file from a directory in an application I am working on. It kept deleting the entry in the table but not the actual file from the directory. Here is what the code looked like:
< ?php
$sql = "DELETE FROM uploads WHERE upload_id = $id";
$result = mysql_query($sql);
//if it ran ok
if (mysql_affected_rows() == 1) {
delete the file from the uploads dir
unlink('uploads/'$row['file_name']);
}
?>
I couldn’t figure out for the life of me then I tried this:
< ?php
//delete the file from the uploads dir
unlink('uploads/' . $row['file_name']);
$sql = "DELETE FROM uploads WHERE upload_id = $id";
$result = mysql_query($sql);
//if it ran ok
if (mysql_affected_rows() == 1) {
//do something
}
?>
It worked perfect! I just had to seperate the name ($row['file_name']), which could also be a variable with a space: ‘uploads/’ . I also had to make sure the unlink was before the DELETE query because if it was after the query it would be trying to delete something that wasn’t there.
20 ways to secure your apache configuration
I found a good resource for from Pete Freitag. He lists some useful ways to secure your apache configurations.










Backseat Drivers