-
Pet Projects
Tag Archives: MySQL
I got an email from Packt Publishing to review a book that they will be releasing very soon (March 2010?). The book is about OpenX. In all honesty, I have not even tried to use OpenX Ad Server yet. Still, … Continue reading
Steve Hollis first blog post about practical nested database transactions using Zend_Db. He writes really well and his blog is very readable. I love reading long text in Serif Thanks Steve! His solution: The Solution Disclaimer: This solution is adapted … Continue reading
I recently had to calculate the amount of work done by an employee between a specific date range. My problem was that the calculation must exclude the weekends. I asked around (both Google and #mysql in IRC) and found out … Continue reading
The model is probably the most difficult to concept to grasp in MVC (Read Surviving The Deep End). This post is very rough and un-editted and is based on my experience. I have gone through the new Zend Framework Quickstart … Continue reading
Fairly simple and I’m sure this would come in handy in the future. This is one of those functions that I thought did not exist. I should RTFM more… SELECT DATEDIFF(’2009-03-31 23:59:59′,’2009-03-29′); /*would output: 2*/ /*Another usage would be … Continue reading
This is a repost from Akrabat.com The Problem:Get a £ (that is the pound sign) character stored to MySQL, retrieved and then displayed without any weird characters in front of it using UTF8. //for the browser//header("Content-type: text/html; charset=utf-8");//OR////then for MySQLmysql_set_charset(‘utf8′);//ormysqli_set_charset(‘utf8′);//or … Continue reading
I recently ran into a problem where I had to compare “1000″ and “999″ — take note of the quotes, these values are strings. I did a SUBSTRING() in order to get those 2 strings, er “numbers”. In this SQL … Continue reading
A few months ago, I would have never read these kinds of posts. But after doing a project that had a huge MySQL database, I am glad that I have found this post. Regardless of whether you’re running a single … Continue reading
The scenario: I am given a huge CSV File dumped thru FTP from some big JDE-ish system everyday. The CSV File is about 15MB or so. The file has around 60,000 lines in it. What I needed to do is … Continue reading
I am posting this because I know I will need this soon or later. I have built a simple recommendation for one of the websites I work with. It is only based on social relationships and does not take into … Continue reading