Archives For MySQL

If you haven’t yet seen it, Steven O’Brien wrote an in-depth series of articles on the Yii framework’s component architecture, posted at phpmaster. In the series, O’Brien looks at the CComponent base class in detail. Every class in Yii is an extension of CComponent, so understanding what it brings to the table can be quite useful to the Yii developer. Part 1 looks at the classes key properties and methods. Part 2 discusses events. And part 3 explains the behaviors. If you’re using Yii, it’s worth reading these to better understand what’s going on at the fundamental level.

In Part 3 of my “[intlink id=”1578″ type=”page”]Effortless E-Commerce with PHP and MySQL[/intlink]” book, I use Authorize.net to process payments for a site that sells physical goods. Authorize.net accepts credit cards and can be directly integrated into your site, so that the customer never leaves (unlike, for example, PayPal’s Website Payments Standard, used in Part 2 of the book, which goes through PayPal’s site). The code in the book was written in a very modular style, with the intent that you can use the components you need, and swap others in and out. A reader specifically wanted to know how you would use PayPal’s Website Payments Pro instead of Authorize.net, and that’s what I’ll explain here. Continue Reading…

MAMP without MAMP

February 24, 2012

For a couple of years now, I’ve used, and advocated using, the MAMP application as the easiest way to run a Web server on a Mac. Currently, the best argument for MAMP is that it doesn’t affect the built-in Apache. This also means that changes to the built-in Apache (via Mac OS X software updates) don’t impact your setup, as can happen if you modify and configure how the built-in Apache runs. Although MAMP itself is free, in time I went ahead and purchased MAMP Pro. MAMP Pro is just a better interface to the MAMP stack, in particular providing an easy way to establish virtual hosts, which I use extensively (i.e., I create a new virtual host for each client or personal project). But I think it’s now time to start doing MAMP—Mac OS X, Apache, MySQL, and PHP—without MAMP, the application. Let’s look at the history and the options here to understand why it may be time for a switch. Continue Reading…

Top 100 E-Commerce Tips

February 3, 2012

I just recently came across this somewhat old post titled Top 100 E-commerce Tips from WebmasterWorld. Despite the fact that the article was published over four years ago, and it’s based upon a slightly older forum thread, there’s still a lot of material in the article worth reading if you do any e-commerce. Even though there are a full 100 tips here, they’re short—most are just a single sentence—and quite valid. Admittedly, I disagree with a couple, and feel like a few could be tossed out, but there are many good points made, and many reminders of things that perhaps you’ve forgotten to emphasize on your most recent e-commerce. project.

Although I don’t normally do this, per a reader request, I’ve made the book’s examples available to be seen and used here. The book has three primary examples, each in an Ajax and non-Ajax form. The pages are:

dept_form.html
This page returns all of the employees in a selected department.
add_employee.html
This page uses Ajax to add an employee to the database (note: the version running on this site does not actually execute the INSERT query that updates the database.)
search_form.html
This page provides a simple search to retrieve employees by last name.

There’s no navigation within or among the pages. You’ll need to click Back to return to this page to see another example. To run one of the examples without Ajax (to see what that’d be like for visitors that can’t use the Ajax version), disable JavaScript in your Web browser.