Showing articles 121 - 130 (147 total)
Posted on 07/09/2009 at 11:56 am | Viewed 18,372 times | 0 comments
I need my CakePHP apps to run on both LAMP and Windows IIS using MSSQL Server. Usually this isn't a problem because CakePHP does such a good job of database abstraction and database independence. However, I came across a scenario the other day where I needed to select a date range using the BETWEEN SQL command. Using CakePHP's BETWEEN...
Read More | Comments
Posted on 07/02/2009 at 09:02 am | Viewed 35,386 times | 2 comments
This may seem simple and trivial, but it took me a little while to figure out. If it saves someone a little trial-and-error then great (I know I won't forget how to do it). I needed to create a redirect in CakePHP that redirected to an inline, on-page anchor- <a name="destination">Scroll to Here</a>. Typing the link directly into the address...
Read More | Comments
Posted on 06/19/2009 at 11:22 am | Viewed 13,265 times | 0 comments
If you haven't become familar with any of the functionality of the CakePHP's Set class, I highly recommend you take a peak . I don't know too much about it and really only learn about it as I go. Well, I finally found out how to do something that used to take several lines of code: creating options for a select list that includes the...
Read More | Comments
Posted on 06/11/2009 at 10:28 am | Viewed 14,265 times | 0 comments
I have an interesting way of dynamically changing a model's validation on the fly. I have a standard approach that involves contact forms, contest entries, etc. using a database to store which fields should be on a form. I tweaked this over time, and recently needed to change the schema from text, which all answers have been up to this point...
Read More | Comments
Posted on 06/09/2009 at 10:18 am | Viewed 23,408 times | 1 comment
I wanted logged in users to be able to see the output from phpinfo(); within Site Avenger. The problem with using phpinfo() is that it outputs a full HTML page, CSS styles and all. In the past this has been fine, but now I wanted to show the phpinfo() within the Site Avenger layout and CSS styles. I came across a simple, yet highly effective...
Read More | Comments
Posted on 06/08/2009 at 04:47 pm | Viewed 14,351 times | 0 comments
I'm trying to use a library within my CakePHP application that needs a variable defined that contains the complete file path to the vendors folder. This can be solved one of two ways- modify the library (which I don't want to do) or use the Configure::corePaths() function in CakePHP. Best Option - using Configure::corePaths() This is a great...
Read More | Comments
Posted on 05/28/2009 at 11:11 pm | Viewed 13,245 times | 0 comments
The default settings for my OfficeJet L7500 All-In-One Scanner suck! I thought the scanner was junk. Every photo I scanned, espcially glossy finished photos, were coming out looking like they were from a 1960s era camera: over-exposed and super high contrast. Not good! I thought I had good Photoshop skills, but even they were no match for...
Read More | Comments
Posted on 05/21/2009 at 11:27 am | Viewed 21,737 times | 2 comments
An interesting problem- I am returning a list of files that have already been uploaded, so the user can link to an existing file. This creates a new record (duplicate record). The next time the user goes to select a file, there will now be two entries for the same file. DISTINCT to the rescue, or so I thought. DISTINCT applies to the whole...
Read More | Comments
Posted on 05/21/2009 at 09:43 am | Viewed 16,781 times | 0 comments
I use Eclipse for all of my CakePHP development work. I love that you can get code completion, class inheritance, and more by following these steps . I also loved that I could have 20 something files opened, and when I changed the active document in the editor, my PHP Explorer hierarchy would change in response. So, I upgraded my Eclipse...
Read More | Comments
Posted on 05/20/2009 at 04:37 pm | Viewed 12,728 times | 0 comments
I ran into a problem I've seen before- Client does not support authentication protocol requested by server; consider upgrading MySQL client. Last time I came across this MySQL error, it was a simple query to fix the issue (from dev.mysql.com ): UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd') WHERE Host = 'some_host' AND User =...
Read More | Comments