Recent Posts
- (09/10) Fixing Warning: the ECDSA host key for 'github.com' differs from the key for the IP addressTAGS:Web Server Admin
- (12/26) CakePHP 3 - Getting List of Column Definitions from a Table (like schema())TAGS:CakephpCake3
- (09/14) Change Order of Loaded Behaviors in CakePHP 3TAGS:Cake3CakephpWeb ProgrammingPhp
- (05/29) CakePHP 3 - Accept JSON Header Only Working When Debug FalseTAGS:Web ProgrammingCakephpCake3
- (05/23) Remove All Events from Google Calendar (Reset Calendar)TAGS:Web ProgrammingPhp
- (11/08) Google Tag Manager (GTM) Not Firing Default PageView EventTAGS:Web ProgrammingJavascriptGoogle Tag Manager
- (10/13) In PHP, how do you get __toString() Magic Method Result without calling echo?TAGS:CakephpCake3Cakephp 13PhpWeb Programming
- (11/14) Getting output from shell_exec() at all timesTAGS:Web ProgrammingWeb Server Admin
Subscribe to my feed
MainelyDesign.com Blog
Habtm Tagged Blog Posts
Forcing A Single Join in CakePHP Pagination
Posted on 10/14/2011 at 09:25 am | Viewed 22,644 times | 0 comments
The devil's in the details... I was trying to make a really simple, dreadfully easy, database join in my CakePHP web application. I've forced joins in Cake before, using the 'joins' key in the options array for find calls and paginate calls with no issue. It was late and for the first time I only wanted to use a single join. I copied the join code from a much more complex web app and pasted it into my new 'joins' conditions. And then... I got SQL errors.
Read: Forcing A Single Join in CakePHP Pagination | View: Comments
Best PaginateCount for CakePHP - with Group By Support
Posted on 08/07/2011 at 05:03 pm | Viewed 20,045 times | 0 comments
I'm been muddling my way through pagination with multiple joins, and complex filtering. I finally got it all working (more on that later, maybe....) when I noticed that I couldn't paginate my results. Everything was working fine until I added a "group" parameter to the find call. Instead of getting the right count, I got a count of 1! A quick look at my sql log tables (at the bottom of the page) and I saw that I had actually returned all the mysql records that were needed! If only there was a way to use them...
Read: Best PaginateCount for CakePHP - with Group By Support | View: Comments
saveAll() to save multiple records in 1 model
Posted on 04/17/2009 at 09:58 am | Viewed 18,946 times | 0 comments
I ran into another issue on something I thought would be simple: saving multiple records with the saveAll() command. In case you don't know about it, saveAll() is one of the best functions in CakePHP. It automatically supports transactions, HABTM saves, and certainly saves a lot of typing for almost every type of save you want to do.
Read: saveAll() to save multiple records in 1 model | View: Comments
Full Tag List
- Cakephp
- Web Programming
- Site Avenger
- Excel
- Csv
- Database
- Saveall
- Vendors
- Import
- Truncate
- Empty Table
- Forms
- Habtm
- Usage
- Tinymce
- Geshi
- Usability
- Upgrade
- Graphic Design
- Internet Marketing
- Software
- From The Hip
- Midcoast Magnet
- User Group
- Component
- Mssql
- Git
- Apache
- Seo
- Htaccess
- Mysql
- Eclipse
- Gear
- Photoshop
- Php
- Css
- Iis
- Web Server Admin
- 404 Errors
- Iisreset
- Web Design
- Hack
- Internet Explorer
- Ie
- Firefox
- Forum Answers
- Jquery
- Swfupload
- Windows
- Example
- Links
- Tutorial
- Errors
- Behaviors
- Cakephp 13
- Humor
- Music
- Jquery Ui
- Ui
- Wamp
- Cloudfiles
- Setup
- Javascript
- Responsive
- Quick Tip
- Cake3
- Foundation
- Google Tag Manager