NYCPHP Meetup

[nycphp-talk] DataObject implementation (was Re: Constructors and)

Cliff Hirsch cliff at pinestream.com
Thu Oct 19 14:06:14 EDT 2006


Thoughts? My though is that "one offs" is where all the fancy schmancy
models start to fall apart... I just outsourced a big project to a firm
that had a nice MVC framework. My how clean the code was. My how short
all the scripts were. Until I opened a few "catch-all" files that went
on forever dealing with the "one-offs"

-----Original Message-----
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]
On Behalf Of David Mintz
Sent: Thursday, October 19, 2006 11:43 AM
To: NYPHP Talk
Subject: [nycphp-talk] DataObject implementation (was Re: Constructors
and)

> $user->insert();
>
> Here's a good article that covers the basics:
>
> http://www.onlamp.com/pub/a/php/2004/08/05/dataobjects.html
>

Quite good, thanks. Now, a question about
http://www.onlamp.com/pub/a/php/2004/08/05/dataobjects.html?page=3

What if you want to find a record WHERE $object->someProp LIKE 'M%' (as
opposed to " = ")?

The first crude thing that comes to mind is, if you want LIKE, say

$user = 'Jane%'

and have your find() method look for '%' and do LIKE if it's found.

Thoughts?
---
David Mintz
http://davidmintz.org/





More information about the talk mailing list