Welcome to Part 2 of Simple Database Queries. Today we will explore the difference between fetch and fetchAll. In Part 1 we had the following query: Notice in the next to last line we have fetch(PDO::FETCH_ASSOC); There is nothing wrong with this query and, in fact, it is the preferred way especially if we only […]
Simple Database Queries (Part 1)
Today we are going to discuss simple database queries. let’s dive right in. First of all you will need a valid connection to your database. Below is an example database connection method. In the above example we have a folder/directory in our root site directory named “connections”. Inside that directory we have a file named […]
Display Dates and Time
Today we are going to talk about the different options we have for displaying dates and times. Since this is categorized under “Snippets” I am not going to go into a lot of detail here. I will simply provide the code and what the resulting display will be. Let’s get started… The first thing you’re […]
Date & Time Formats
Character Description Returned Values DAY d Day of the month, 2 digits with leading zeros 01 to 31 D A textual representation of a day, three letters Mon through Sun j Day of the month without leading zeros 1 to 31 l (lowercase “L”) A full textual representation of the day of the week Sunday […]
Introduction
Hello world. Maria Alfante here. ASP programmer converted to PHP programmer. haha Actually I started programming websites in 1999 with basic HTML and quickly progressed to dynamic content using ASP-SQL. My area of concentration was e-commerce sites and real estate sites. Being the stubborn and hard-headed person that I am I all but refused to […]
Recent Comments