| All About Data |
In MySQL (or, for that matter, any other RDBMS), every field in a table is associated with a particular data type, which defines the kind of data that may be entered into that field. This data type is the fundamental characteristic of that field - it states whether the value entered into the field must be numeric, string, binary or timestamp, determines the rules for performing calculations on that value, and helps enforce the consistency of your records. Selecting and attaching appropriate data types to your table fields is thus one of the most important things a database developer must do in the design phase of a project.
Now, MySQL supports a number of different data types, and one of the more versatile and commonly-used ones is the string data type (which itself has many sub-variants, each serving a different purpose). You've almost certainly used string values in your interaction with a database before - most databases would be pretty pointless without them - but have you ever taken a look at the MySQL manual and seen the rich variety of string processing functions MySQL gives you?
If you haven't, you're in for a pleasant surprise in the next few minutes. You see, MySQL comes with an extremely large collection of built-in functions (over 150 at last count) and many of them are designed specifically to simplify the task of string manipulation. This string processing toolkit is so powerful that many of the tasks developers normally execute at the application level - concatenation, pattern matching, search-replace operations, whitespace trimming - can actually be performed at the database layer itself.
Surprised? Don't be. Instead, keep reading, because over the next few pages, this article will offer you a broad overview of MySQL's string manipulation capabilities, serving as both a handy reference and a tool to help you write more efficient SQL code. Regardless of whether you're new to MySQL or if you've been working with it for a while, you should find something interesting in here.
How to do Everything with PHP & MySQL
How to do Everything with PHP & MySQL, the best-selling book by Melonfire, explains how to take full advantage of PHP's built-in support for MySQL and link the results of database queries to Web pages. You'll get full details on PHP programming and MySQL database development, and then you'll learn to use these two cutting-edge technologies together. Easy-to-follow sample applications include a PHP online shopping cart, a MySQL order tracking system, and a PHP/MySQL news publishing system.
Read more, or grab your copy now!