First PHP/MySQL Project Day 5: Date Functions, Updating Data, and More
I put this project on hold for a while, but I made up for it today by learning a lot — maybe a little too much! To add deadlines and recurring tasks to my to-do list, I had to learn about MySQL’s date functions, operators, null values, the UPDATE statement, and the CASE control flow function. It’s all summed up in this nine-minute screencast:
Links for Date Functions, Updating Data, and More
All of these are from the MySQL manual, except where specified:
- Date and Time Types - Info on the date and time data types.
- Date and Time Functions - A list of MySQL’s date functions, including
DATE_ADD. - Operators - A list of MySQL’s many operators.
- Working With NULL Values
- PHP MySQL Update - An overview of the
UPDATEstatement from W3Schools. - Control Flow Functions - Info on the
CASEstatement, plus a couple others. - MySQL Lists - Possible to use a conditional in this UPDATE - This is the example that helped me figure out how to use functions inside the
UPDATEstatement.
How’s that for a productive day? Before this I didn’t know the first thing about MySQL’s functions, and now I know how to make a huge query using multiple functions and fancy operators!


July 8th, 2007
You got done a lot for a day. Also you can use basecamphq for keeping tabs on your hrs and notes
July 23rd, 2007
Any update on a new tutorial?
Have you thought about doing OOP, Object Oriented Programming. That would be cool.
^_^
July 23rd, 2007
Yup, I do wanna learn about OOP eventually.
Probably not for a while, though. I think I’m gonna be done with this project soon and then move on to other things, like JavaScript.
July 25th, 2007
Hi ^_^
I’m trying to learn OOP. Quite difficult at the moment. Apparently it was very hard with php-4 because it didn’t have proper support.
If you do javascript, go the unobtrusive javascript way. It means you don’t have to add things into the actual html, everything is done is the javascript file. Plus i’m guessing its going to (or maybe is) a standard. (better for acceptability, non javascript browsers, etc)
Are you gonna do a backend (admin) thing for thing application your working on?
I have just finished a css template, well most of it. I did an “expandable” layout.
It works fine, and is valid, but I was thinking of adding more stuff to it.
CSS, isn’t too hard, but it can give you a headache quite quickly. What with browser compatibility, and making it fluid, look the way you want, etc.
I would say you should do a little css, just some basics then go on to javascript. But its up to you :p
Looking forward to your next video.
July 26th, 2007
Thanks, Yas.
I’ll keep that in mind about the JavaScript file. And yeah, I’m thinking of doing a series on basic HTML and CSS, just for any complete newbies out there — and also for me to review. But you’re right, it would make sense to do that before getting to JavaScript. I think that’s what I’ll do.
As for this project, no, I’m not gonna get into making an admin thing. I just don’t want to bother. =P I decided I’ll make one more video and then put this project to rest — I might come back to it again in the future, but it’d be for a new series on more advanced stuff.
August 8th, 2007
Heres something on the javascript thing:
http://www.onlinetools.org/articles/unobtrusivejavascript/chapter1.html
Thats the main link people point to, but there are probably a few more, Google it.
I read that a large percent on website design is to do with typography so something on that would be cool too. I guess its true, because when you go to sites were the text “flows” well then you stay and it looks nice.
This project has been cool. Doesn’t matter if you do the admin thing, I’m guessing it wouldn’t be too hard for people.
You could, after you have done some javascript move on to dhtml then *buzzword alter* AJAX :p
August 8th, 2007
Nice, thanks for that link! I have it bookmarked.
Typography and AJAX are definitely on my list, too. So much stuff, so little time! But I’ll get to it one day.
June 19th, 2008
[…] I’ve done loads of reading and searching and found pieces of the puzzle all over the net. This video however was most use and helped get my head round a few things i was trying to […]