February 18, 2019
Category: software
132 views
OK, so I was looking around the Internet trying to find out how to format the date that has been pulled from a mysql database and did not get very far, so I thought I would write this blog post. I have been using Prepared Statements and PDO for a few years now as mysqli can be subject to mysql injection. I was pulling a ‘timestamp’ data type from a mysql database which contains the date and time that the record was created.Lets go through the code step by step.
// Get data from database
// Replace 'your-table' with the name of your own table
$query = "SELECT * FROM your-table";
$statement = $db-prepare($query);
$statement-execute();
$heros = $statement-fetchAll(PDO::FETCH_ASSOC);
$statement-closeCursor();
ID
Name
Power Rating
Created on
%
So what does it look like when you finished?
Below is a screenshot of my little application. The date can be manipulated to remove the year or to display the time if you wish.
I have been using Prepared Statements and PDO for a few years now as mysqli can be subject to mysql injection. I was pulling a 'timestamp' data type from a mysql database which contains the date and time that the record was created.
See the full article:
https://xl-websites.com/how-to-change-the-date-format-in-php-within-a-foreach-loop-using-a-prepared-statement/
February 16, 2019
Category: Education
117 views
Before we learn to play easy versions of the C# guitar chord we’re going to learn the two most common ways to play this chord:
The C# Barre Chord (E Shape)
The C# Barre Chord (A Shape)
Both of these chord shapes are barre chords. If you’re not sure how to play barre chords watch this video for some tips:
Top Tip!
If the chord doesn’t say what type of chord it is, assume it is a major chord.
If you see the word ‘minor’ after a chord or a lowercase ‘m’, that means it’s a minor chord.
Whereas if there is no word after the chord, for example ‘C# Chord’, that means it’s a major chord.
For today’s lesson we are going to learn how to play the C# Major Chord.
You can get in-touch or read my profile here:
https://southendmusicschool.co.uk/teacher/steve-dunning/
February 16, 2019
107 views
1 Place your middle finger on the 5th string, second fret. Remember, the 5th string is the second highest string from the top, or the A string. Place your middle finger just to the left of the second fret (for right-handed guitarists), as near to the fret as possible so that you get a clean, clear tone.
2. Place your ring finger on the 4th string, second fret. Your ring finger simply goes right underneath your middle, holding the second fret on the D string. This is the third string from the top. Again, keep your finger near that second fret, but still on the head-side of the guitar.
The head of the guitar is the small piece at the end of the neck with the tuning knobs.
3. Leave the other strings open. All an E-minor chord requires are those two strings and two frets. Make sure you use the tips of your fingers on the frets so that you don't accidentally mute the lower strings -- you want them free to ring out.
4. Strum all the strings at once. The Em chord uses every string on the guitar, so you can strum away freely. However, for a deeper, darker sound, limit yourself to just the top four strings or so. For a lighter sound, like in many ska and reggae songs, just play the bottom 3-4 strings.
To learn more, see my teacher profile on Our Music School website:
https://southendmusicschool.co.uk/teacher/mike-bennett/
page=1&profile_user_id=284677&year=&month=
Load More