Export Parts of MySQL Table to Excel CSV File Using PHP
This is a quick snippet of code I created to dynamically pull a user-defined query from a MySQL database.
Read More »Throughout my career as a web designer and developer I've had to come with new ways of solving particular problems. Here is a series of tutorials to share my experiences and knowledge with our community.
This is a quick snippet of code I created to dynamically pull a user-defined query from a MySQL database.
Read More »
Posted on January 28, 2010 in PHP Tutorials and has been tagged as excel, mysql, php.
Here’s a quick snippet of code that allows you to quickly generate a random string of letters and/or numbers based on the variables you feed into the function.
Read More »
Posted on January 8, 2010 in PHP Tutorials and has been tagged as php.
In my experience with custom WordPress installs, I found myself installing the same plugins over and over. What I’ve done to increase my efficiency of installing WordPress, I took all my most used plugins and dropped them into the plugin folder of my WordPress install package.
Read More »
Posted on January 4, 2010 in WordPress Plugins and has been tagged as plugins, wordpress.
This problem came up while working with the Allegheny County Property database. They have a field for the sale date of the property, only they’re storing the date like this – 3291982 for 03/29/1982.
Read More »
Posted on September 30, 2009 in PHP Tutorials and has been tagged as dates, php.
Take an array of numbers, strip out the dollar sign and format them correctly.
This is useful when you are given prices as varchar or text with the dollar sign already included in the field. We’re going to start with an array of numbers, in this case we’ll use the array(‘$1256.45′,’$5564.75′,’$7895.33′).
Here is the foreach loop running: [...]
Posted on August 7, 2009 in PHP Tutorials and has been tagged as php.
Here’s the question that was asked:
“Basically I want to take all of the posts in the “Freelance” category and remove them from the main content so that I can link to them from a page instead of including them in the Loop. ”
Here is the code to exclude an entire category from appearing within the [...]
Posted on July 23, 2009 in Wordpress How-To's and has been tagged as wordpress.
Have you ever needed to find all the ancestor ID’s of a page in WordPress? If so, you’ve come to the right place. Here’s some quick code to give you up to the great grand parent ID.
$current = $post->ID;
$parent = $post->post_parent;
$get_grandparent = get_post($parent);
$grandparent = $get_grandparent->post_parent;
$get_greatgrandparent = get_post($grandparent);
$greatgrandparent = $get_greatgrandparent->post_parent;
echo “parent = $parent; grandparent [...]
Posted on July 10, 2009 in Wordpress How-To's and has been tagged as wordpress.
A common problem that I’ve encountered – how to control dynamic text based on how long it is. In this case I had titles ranging from 10 characters to 25 characters – this includes spaces. The goal is to make them centered regardless of how many letters and spaces are in the title.
Here is an [...]
Posted on July 8, 2009 in Wordpress How-To's and has been tagged as css, php, wordpress.
Here’s a quick bit of CSS and HTML to achieve a simple dropshadow on text that uses abosolute positioning. This would work great for titles in WordPress. You can adjust the top and left positioning of the .bottom class depending on the offset of dropshadow you want.
Read More »
Posted on July 8, 2009 in CSS Tricks and has been tagged as css.
My name is Andy Weigel and I'm a web developer and designer in Pittsburgh, PA.
I focus on combining design with technology to build compelling, creative, easy-to-navigate web sites and custom web applications for organizations and businesses of all shapes and sizes. My specialty is WordPress. And most of all, I love what I do!