I have XAMPP and cakePHP intalled locally, and have been wondering why my bake.php is not working like it is supposed to be according to the tutorials. It fails to bake and gives an annoying error message in the command prompt. After some debugging with the help of exit() and die(), I found out that PHP (v4.4.2) is not reading the arguments on the command line. [Read more…]
Web Developer Tools Roundup
As a web developer, you definately find times when you found a cool webpage and wonder how they did it. You wonder if there’s a tool that can show you in real-time what is happening or let you access the properties, attributes, HTML, CSS, DOM, JS of a page. Bear in mind that I’m not talking about what happens in the backend like server-side scripting language (Perl, PHP, ASP, CFM and JSP) and database access but more into the looks and user interaction (which i would refer to as the frontend). [Read more…]
Popular Web and Social Sites Backend
A database server is basically a central location where you host your database files. There is no question that in any web application, social websites or web 2.0 sites or whatever, that the database server is like the heart and you can’t live without it. And in recent years, thanks to open source, lots of companies and social sites has chose to stick with MySQL for their database. I think the reason is obvious.
1. Cost and Scalability
2. Support
3. Stability
[Read more…]
Insert Multiple Rows With One SELECT Statement
Use INSERT…SELECT.
INSERT INTO table_name SELECT col1, col2, col3 FROM table_name_same_or_other
The multiple rows are returned based on the conditions after your SELECT statement.
You can use this to copy contents from 1 table to another for backup or simply for moving or storing data.
Detecting File Type Extension of Uploaded File
In PHP, you can do this in 2 ways (if you know more than that, please let me know :)) [Read more…]
Difference Between Sub Routine and Function
You may or may not know, but there are differences between a function and a sub routine. A sub routine is an assignment that is carried out but doesn’t give back a result. Like a sub routine, a function is used to perform an assignment. The main difference between a sub routine and a function is that, after carrying its assignment, a function gives back a result.
Simply put, a function “returns a value” while a sub routine don’t.
Character Sets and Collations
Do yourself a favor today. For a fast, short and easy read of what character sets and collations really means, head over to mysql official documentation (I always like to say that MySQL has the best documentation among database vendors, unlike Oracle and SQL Server) [Read more…]
Cluster Computing and MapReduce Videos
I’ve mentioned Google’s MapReduce algorithm in a previous post and guess what, I’ve digg deeper and found a video lecture (http://code.google.com/edu/content/submissions/mapreduce-minilecture/listing.html) released officially by Google discussing about the topic. [Read more…]
Using FullText Indexes
MySQL has the best documentation in the world regarding databases. Yes, screw Oracle and SQL Server, there documentation are like tons and tons to be read and you need to drink 5 cups of coffee to understand them. Not for MySQL.
Simply put, FULLTEXT indexes are designed for finding strings within larger natural language fields.
Managing Massive Data
I was really curious of how massive data are managed, especially by search engines such as Google or utilities company (electricity, water and gas) since they often involve storing data of the entire state or country. Google does release some technical papers on how they do it. For those of you who are as curious as I am, you can at least try to have a peek on how they do it. [Read more…]