Actually, IIRC if the length is zero, then the result is undefined, so if we're in that line, there will be an array of results. Not terribly clear though - since you'd expect it to be the same as the mysql version.