14 SOLUTIONS TO COMMONPHP/MYSQL PROBLEMS

What this chapter covers:

  • Extracting the first section of a longer text item
  • Using an alias in a SQL query
  • Formatting dates with PHP and MySQL
  • Working with multiple tables in MySQL

We have some unfinished business left over from the last chapter. Figure 13-2 shows content from the journal table with just the first two sentences of each article displayed and a link to the rest of the article. However, I didn't show you how it was done. The full list of articles in journal_list.php also displays the MySQL timestamp in its raw state, which isn't very elegant, particularly if you're using MySQL 3.23 or 4.0. In addition to tidying up those two things, this chapter addresses some of the most common questions ...

Get PHP Solutions: Dynamic Web Design Made Easy now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.