Blog

Author Archive


MySQL LEFT JOIN and WHERE Example
Posted on July 7, 2015 in MySQL by Matt Jennings

Consider a user_quotes MySQL database with the three tables below:

users
quotes
favorites (one to many relationship with the users and quotes tables)

The …

Read more


MySQL Subquery Example
Posted on July 7, 2015 in MySQL by Matt Jennings

Consider a user_quotes MySQL database with the three tables below:

users
quotes
favorites (one to many relationship with the users and quotes tables)

The …

Read more


Multiple Ways to Use For Loops with Arrays and Object Literals in JavaScript
Posted on July 6, 2015 in JavaScript by Matt Jennings

var myArr = [1, 4, -9, -5, 5, 2];

for(index in myArr) {
console.log(myArr[index]);
}

/*
Displays:
1
4
-9
-5
5
2
*/

// The object key names must be …

Read more


Delete a Database Row using CodeIgniter with Model, Controller, and View Code Examples
Posted on July 2, 2015 in CodeIgniter, MVC, MySQL, PHP by Matt Jennings

<?php
class UserDashboardModel extends CI_Model
{

// After admin is logged in
// delete user

Read more


Insert a User with Admin Privileges into a Database Using CodeIgniter with Model, Controller, and View Code Examples
Posted on July 2, 2015 in CodeIgniter, MVC, MySQL, PHP by Matt Jennings

<?php
class UserDashboardModel extends CI_Model
{

// After Admin is logged in insert user
public function …

Read more