Creating a new MySQL database with mysqladmin

Here is a quick tip for all of my command line brothers and sisters out there. If you need to create a new MySQL database, it’s super quick and easy to do it on the command line with the mysqladmin command. Yeah, there are some GUI’s out there, but just because you have a GUI doesn’t mean it’s easier or faster. Besides, if you know how to do it via the command line, you will have a better understanding of what that GUI tool is doing, especially when it messes up.

Back to the tip, if you want to create a database named ‘mydatabase’ you would type something like this:

mysqladmin create mydatabase

See? It’s just that easy! From here, it’s easy create tables too. You can type this right into the mysql prompt, or import from a text file. I’ll have more on that coming up soon. Stay tuned!

Game Review: Portal

Valve Software, the folk that brought us the Half-Life family of games, has something new and (from my experience) pretty different out. It’s a game called Portal, and it’s unique in that it’s a first person shooter type of game, from the perspective of the player and the controls, but it’s purely a puzzle game. You don’t shoot anything (so far anyway, I haven’t finished it yet), but you do use “portals” to maneuver through test chambers and make things happen. So far, it’s been quite fun, rather addicting, and challenging too. Half-Life is great, Half-Life 2 is awesome and truly groundbreaking, portal is ingenious and fun, I recommend checking it out!

Getting the IP of the current visitor in PHP

Sometimes, you have the need to grab the IP address of the current visitor to your site.  I use this for logging actions like comment forms, etc., but also for blocking IPs if there is a need.  Whatever your reason, this is a good chunk of code, in the form of a function you can call, to return the IP address of whoever is loading that page.  Check it out in the forums!

Posted in Uncategorized. Tagged , .

Powerful and Free Office Suite

When you thought of word processors years ago, everyone thought of WordPerfect.  Now, everyone thinks of Microsoft Word.  Spreadsheets are the same way, Quattro Pro in years past, Excel in the present.  Well, I want to share with you an alternative to the current champion of the office software suite Microsoft Office.  This alternative is free, robust and powerful, runs on many different operating systems and can even read and write lots of files, including Microsoft Office.  You can even export your documents as a PDF file, now how cool is that.  The software I am talking about is called OpenOffice and it’s put together by the community, with a lot of help from big names in the industry like Sun Microsystems.  I have been using OpenOffice for years, and it has really come a long way, to the point that I prefer it over Microsoft Office.  Also, consider the price if you are on a budget and it’s even better.  There are some people out there who will argue my sentiment, and that’s fine, it’s a free country.   I bet though, if you check it out you will find you like it.  Enjoy!

Find the current directory with PHP

Here is a quick PHP tip that has come in handy for me in times past, it deals with finding the current directory that you are in. I am going to show you how to get two different answers to that question depending on what your needs are. First, let me explain why we would get (or even need for that matter) two different answers. This is because from a PHP page being served up by your web server, there are two current directories from its perspective. One would be the absolute directory to the script, which includes the full path to the root of the web files.

Continue reading

Posted in Uncategorized. Tagged , .

Microsoft wants to be Google

It’s kinda funny I think, Microsoft launched their competitor search engine to Google over two years ago, touting then that it would be a “Google killer” (as if), and now, all this time later they come out saying that they have revamped their search yet again and now they can compete with Google.  Google just keeps on doing what they do best, and Microsoft keeps trying to catch up with everyone else.  Check the article for details.