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.
Creating a email form using actionscript and php
I just finished an email form that I put up on my contact page. It was an assignment for my Actionscript class. I used Actionscript to import and place the components, validate, and send data using a LoadVars function to a php script, which then sends off an email to myself. This was the first time I used Actionscript and PHP together and I’m stoked on what you can do with it. My minds really starting to buzz and I can’t wait to learn more.









Backseat Drivers