Skip to content
  • Archives
  • Buy Adspace
  • Contact me
  • Hide Ads for Premium Members

zen of coding

holistic web development

  • Archives
  • Buy Adspace
  • Contact me
  • Hide Ads for Premium Members

Month: May 2008

  • Home
  • 2008
  • May
CakePHP

I want objects, not arrays!

May 28, 2008 vladko

A few times I’ve heard people complaining about the fact that CakePHP’s find methods return data as arrays and not as objects. “It’s not OO!”,

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email

Like this:

Like Loading…
Read More
CakePHP

Incrementing a field in CakePHP

May 22, 2008June 20, 2013 vladko

Let’s say you have an application, where users can place votes for their favorite products and you’d like to increment the current number of votes

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email

Like this:

Like Loading…
Read More
CakePHP

CakePHP cookbook 1.2 (as of 05/21/2008) in PDF format

May 21, 2008 vladko

Update: 6/09/2008 Unforunatelly I cannot have this PDF file here anymore, since it is a violation of the license. The good news is that PDF

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email

Like this:

Like Loading…
Read More
CakePHP

Remember $this!

May 15, 2008 vladko

Do you need to get some information about your current state of the cake app?… Maybe find out the name of the current layout? Or

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email

Like this:

Like Loading…
Read More
CakePHP

Build a string from a resultset array

May 13, 2008 vladko

Sometimes it’s very handy to be able to quickly build a string from CakePHP’s resultset array. For example you want to build a string of ID’s

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email

Like this:

Like Loading…
Read More
CakePHP

I need the first record from my table…

May 13, 2008 vladko

Let’s say you need to know when was the very first user record created. Add a method like this to your User model (assuming you

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email

Like this:

Like Loading…
Read More
CakePHP

Array from XML in CakePHP

May 12, 2008 vladko

Update (9/9/2008): Since the writing of this post, there is now a nicer way to handle this, which David Persson kindly pointed out: $Xml =

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email

Like this:

Like Loading…
Read More
CakePHP

amCharts with CakePHP

May 9, 2008 vladko

There is a very slick flash charting tool out there called amCharts (www.amcharts.com). If you are in need of some reporting or charting UI for your

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email

Like this:

Like Loading…
Read More
CakePHP

CakePHP and custom SQL

May 9, 2008September 23, 2010 vladko

If you’ve been around CakePHP for some time, you’ve probably heard that writing custom SQL is pretty much frowned upon. At the core, CakePHP provides

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email

Like this:

Like Loading…
Read More
CakePHP

Redirecting to the home page

May 7, 2008 vladko

Sometimes you’d like to create a link that will redirect your traffic to the homepage. For example, you have some partner web site that will

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email

Like this:

Like Loading…
Read More

Posts pagination

1 2 3 Next

New Posts

  • I don’t bother with “whiteboard interviews”.
  • PHP MVC Frameworks preview of 2018 (Phalcon 3, Symfony 4, Laravel 5.x and others)
  • Case study: building a better search with Algolia and Lumen PHP
  • The State of PHP MVC Frameworks in 2017 (Laravel, Symfony, CodeIgniter, CakePHP, Zend)
  • The great PHP MVC Framework Showdown of 2016 – (CakePHP 3 vs Symfony 2 vs Laravel 5 vs Zend 2)

Top Posts & Pages

  • Easy CakePHP logging to FireBug with DebugKit and FirePHP
  • Upgrading Ubuntu to 14.04, 500 errors because of .htaccess and other fun things...
  • The great PHP MVC Framework Showdown of 2016 - (CakePHP 3 vs Symfony 2 vs Laravel 5 vs Zend 2)
  • PHP MVC Frameworks preview of 2018 (Phalcon 3, Symfony 4, Laravel 5.x and others)
  • Redirecting to the home page
  • JQuery in the CakePHP world (part 1 - the basics)
  • "Error: Database connection "Mysql" is missing, or could not be created". CakePHP 2.0 -- cake bake trouble
  • I can't get my estimations right... Top issues and remedies
  • Set variable in the view to be used in the layout
  • CakePHP + MySQL + Tinyint(1) = Confusion
May 2008
M T W T F S S
 1234
567891011
12131415161718
19202122232425
262728293031  
    Jun »
All Rights Reserved 2024.
Proudly powered by WordPress | Theme: Fairy by Candid Themes.
%d