Release Day: MySQL with PHP and Some Bonus YAML

Image
Weekly Release

This week we're continuing PHP for Beginners Part 3, which is working with databases in PHP, along with a bonus lesson on YAML. YAML (YAML Ain't Markup Language), is a human-readable data serialization format that's been widely adopted in a variety of use cases in Drupal 8. Anyone wanting to write modules, or themes, for Drupal 8 will need to understand YAML syntax. Even site-builders are likely to encounter YAML at least in passing as YAML is the data-serialization format of choice for Drupal 8's configuration management system. Joe created a short tutorial to look at the YAML data format and provide examples of how to write and read YAML, so that you're ready for it when Drupal 8 comes out.

Last week, we started off my covering the fundamentals of SQL and working with a MySQL database. Today we hook this up with the PHP site we're building. You're going to learn how to connect the database to PHP, and understand your basic working tool, PDO objects. With that in place we'll take a look at setting up database configuration files in PHP and how to play around with our data by limiting our results.

This week's PHP lessons are:

Next week we'll be finishing up Part 3 with a tour PHP functions and an important lesson on security when working with databases.

Add new comment

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <code class> <ul type> <ol start type> <li> <dl> <dt> <dd><h3 id> <p>
  • Lines and paragraphs break automatically.

About us

Drupalize.Me is the best resource for learning Drupal online. We have an extensive library covering multiple versions of Drupal and we are the most accurate and up-to-date Drupal resource. Learn more