Basic SQL queries

on Sunday, May 24th, 2015

Create a database: CREATE DATABASE places; Create a table with columns specifying the datatype: CREATE TABLE cities ( id int, city varchar(30), state varchar(2), costindex decimal(5,2) ) Insert a new row of data: INSERT INTO cities(id, city, state, costindex) VALUES(1, 'Reno', 'NV', 80.20) Insert data with empty columns: INSERT INTO cities(id, city, state) VALUES(2, 'Provo', […]

Adding Images to WordPress Previous Post and Next Post Links

on Sunday, May 3rd, 2015

Adding images to the previous post and next post links in WordPress can enhance the look of your website. To add image links for a single blog post, just use previous_post_link and next_post_link and add any images and text you want to use as arguments: single.php <div class="prev-posts"><?php previous_post_link('%link','<p><img src="' . get_bloginfo( 'stylesheet_directory' ) . […]

My Rails New App Cheat Sheet

on Friday, May 1st, 2015

I made this personal cheat sheet to remind myself what to do when I start a new rails app. 1.To make a new rails app specifying the version: rails _4.1.7_ new myapp This creates a new Rails app with Rails version 4.1.7 with SQLite3 as the default database. 2. Modify the Gemfile. This is my […]

Next Page » « Previous Page