Archives
-
This Week’s Link List (February 25, 2011)
With all the snow in Seattle this week (I know people in the mid-west and on the east coast are laughing at me when I say that), I feel out of sync. I’m sure I’ve missed lots of interesting links this week…I should have plenty of time this weekend to hunt more down since we’ll be iced in. But, what I did come across this week is good – lots of PHP/Azure news as the PHP on Azure contest heats up…
-
SQL Server Driver for PHP Connection Options: CharacterSet
In this post, I’ll add to my slowly growing series that elaborates on the connection options for the SQL Server Driver for PHP. This time I’ll focus on the CharacterSet option. This is the option that specifies how data will be encoded when it is sent to and from the server. I’ll take a look at how and when to use the different values for this option, as well as briefly look at what the driver is doing under the hood for each value. This is especially interesting in the case of storing UTF-8 encoded data since SQL Server only supports storing USC-2 encoded data.
-
This Week’s Link List (February 18, 2011)
In this week’s list, be sure to look at the comprehensive list of conferences if you haven’t already made your conference plans for the year. There’s also some good links that are helpful in learning about testing, but maybe nobody needs to read those since everyone knows how to write good tests…right? The “just for fun” links require a beverage, but that’s fine since it’s Friday…
-
Do Stored Procedures Protect Against SQL Injection?
When I’ve asked people about their strategies for preventing SQL injection, one response is sometimes “I use stored procedures.” But, stored procedures do not, by themselves, necessarily protect against SQL injection. The usefulness of a stored procedure as a protective measure has everything to do with how the stored procedure is written. Write a stored procedure one way, and you can prevent SQL Injection. Write it another way, and you are still vulnerable. This post will look at one common pitfall that can leave stored procedures vulnerable to SQL injection.
-
Three Components of a Successful Project
Earlier this month I attended the monthly meeting of the Seattle PHP Meetup Group. In ways I didn’t expect, it was a very interesting meeting. The content itself was interesting enough (we were talking about database design), but what I found even more interesting was how the meeting dynamics provided a good reminder of what goes into a successful software project. What I observed was nothing new – what I have to say will all be familiar to anyone who has run successful software projects – but my observations served as reminders of some of the key components of a successful project.
-
This Week’s Link List (February 11, 2011)
In categorizing this week’s links, I was reluctant to put so many interesting links into the Miscellaneous category because I sometimes think of miscellaneous as implying a lack of importance. But note, that thought is wrong! Miscellaneous means “made up of many different things or kinds of things that have no necessary connection with each other.” There is no mention of (or even implication of) lack of importance in that definition. Some of this week’s most interesting links are in the made-up-of-many-different-things-or-kinds-of-things-that-have-no-necessary-connection-with-each-other-(not-unimportant) category…
-
SQL Server Driver for PHP Connection Options: ReturnDatesAsStrings
This is short post to address a frustration I’ve seen mentioned on Twitter and in forums a lot: By default, the SQL Server Driver for PHP returns datetime columns as PHP DateTime objects, not strings. This can be especially frustrating if you are not aware of the ReturnDatesAsStrings connection option. By simply setting this option to 1 (or true) when you connect to the server, datetime columns will be returned as strings.
-
This Week’s Link List (February 4, 2011)
Once again, here’s the highlights of what I read this week. As I call out in one point below, I’m sure I’m missing some good stuff…would be interested in what readers have come across this week they find worth sharing.
-
Paging Data with Different Cursor Types
This post is a follow up to a post I did last week: Paging Data with the SQL Server Drivers for PHP: Simplified. In that post, I showed how to leverage scrollable cursors to simplify code for paging data. However, my investigation used only one type of scrollable cursor: a static cursor. In this post, I’ll investigate the behavioral differences of paging data with a static cursor and the other two scrollable cursor types: keyset and dynamic cursors. I did write a high-level comparison of the different cursor types last year, but what I really want to focus on in this post are the practical differences between the different cursor types in the paging scenario.