Categories

count_all_results() and get_where() in CodeIgniter

This silly little mistake tripped me up for a bit this morning and I only figured it out after some searching. Based on the results I’m not the only person that has hit this roadblock, so here is the solution.

I was doing a normal query that looked something like this:

$read_db = $this->load->database(‘read’, TRUE);
$query = $read_db->get_where(array(‘username’ [...]

Today I Made…

Today I started a new personal project that I’m hoping is going to be a lot of fun. Right now I’m calling it “Today I Made”, although I’m not sure that will be final name until I can secure some sort of domain name I like.

The idea of the site is that you will be [...]

Add A New Products Section to a Magento Store Homepage

Was looking for a way to add a New Products section to the homepage of a Magento store I’m working on a found a great write up on Richard Castera’s blog. All you really have to do is add this code to the homepage code in your CMS section:

{{block type=”catalog/product_new” name=”home.catalog.product.new” alias=”product_homepage”template=”catalog/product/new.phtml”}}

Check out the full [...]

Could It Really Be That Easy?

In a project we are working on we needed a way to extract the number portion of a weight from a string. So we could receive any of the following:

21
21 lbs
21.3
21.3 lbs

We started looking into some regular expressions to do the job, but then ran across a page saying that you can just cast it [...]