MainelyDesign.com Blog

Truncate Tagged Blog Posts

Difference Between Truncate and Empty (Delete From) in Mysql

Posted on 06/23/2010 at 02:30 pm | Viewed 33,060 times | 1 comment

I use Navicat for administering all of my MySQL databases.  It has a command that I always use- empty table.  I noticed today that all along there has been a command right below it for truncate table.  Hmmm.  I figured this would result in the same outcome and wondered what the difference is between emptying a mysql table and truncating the same table.

Cakephp's Flay Class is Amazing - Examples Included

Posted on 09/08/2009 at 09:31 pm | Viewed 13,931 times | 0 comments

If you haven't checked out CakePHP's Flay class, check it out. It's one of the best utility classes for text output in CakePHP.

I just noticed that my blog was using the same META description for all of my blog entries- not good for SEO.  Instead, I want to pull a fragment of the article copy and use that as my META description.  I currently use this convoluted way to get my summaries from the article copy, so I decided to try using the Flay class.  I've used it before but I'm glad I revisited it... it's amazing!

Importing an Excel file into CakePHP

Posted on 04/16/2009 at 02:42 pm | Viewed 33,659 times | 0 comments

I needed to be able to upload an excel file, parse the file, and then add each row as a separate database entry.  I had this working for a CSV file using the php built-in function fgetcsv(), but the client switched to using an excel file (instead of direct PHP access to the in-house database, we decided to have the client upload a CSV/Excel file). 

Full Tag List

Meet Site Avenger - Hosted Content Management System

Powered By: Site Avenger | Site Production: Saco Design