Written on February 23, 2010
by Zaki
and 2 peoples have comment
Early last year, I got the chance to learn and develop a huge web application using CodeIgniter PHP Framework. It was my first project using the framework so at that time we have decided to avoid using CodeIgniter default Database Library in fear of incompatibility with oci8 or Oracle10g.
Only afterward did I got a chance to test out CodeIgniter Database Library or ActiveRecord Library on project using MySQL. At this point, the simplicity of ActiveRecord really caught my attention but how would it be enough compared to ADOdb when using Oracle Database?
[Click here to read more...]
Written on December 07, 2009
by Zaki
and 2 peoples have comment

Conventionally getting today date from database in the past would require the use of date('Y-m-d'); function and add it to MySQL query such as below:
$today_date = date('Y-m-d');
$tmrw_date = date('Y-m-d', strtotime("+1 day"));
$sql = "SELECT * FROM my_table
WHERE my_datetime BETWEEN '" . $today_date . "' AND '" . $tmrw_date . "'";
However this method might return false positive result if the web server and database server doesn’t have it date and time synchronized. From my point of view, it best to let the database server have the full control to insert, update or compare the dates. So what the alternative? You can check the full specification from MySQL Date and Time Functions but I would opt for DATEDIFF if you specifically want to compare with today date.
SELECT * FROM my_table
WHERE DATEDIFF(my_datetime, SYSDATE())=0
Written on March 31, 2009
by Zaki
and 2 peoples have comment
Let forget about mail() function in PHP, as most emailservers today will eventually mark e-mails sent using this function as spam. But fear not, there are better way to send e-mail and today and one of it is SwiftMailer, it support e-mail sending using both method (mail() or SMTP method) but our problem will not be solve if we still using mail(), the use SMTP is the way to go by minimizing the possibility of your e-mails to end up in spam/junk folder.
[Click here to read more...]
Written on March 16, 2009
by Zaki
and 2 peoples have comment
Did mine and use it for some of my projects including Advertlets and KitaPunya but Now I’m glued with CodeIgniter. So hope you find Why everyone should write a framework and never use it by Jaisen Mathai useful as well.
Written on February 14, 2009
by Zaki
and No one have comment
Recent Comments