NYCPHP Meetup

NYPHP.org

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

David Mintz dmintz at davidmintz.org
Thu Oct 19 12:42:32 EDT 2006


> $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/

En Nueva York el tránsito de la belleza a la desolación sucede
siempre expeditivamente, como si el principio universal
de máxima eficiencia hubiera aconsejado la supresión de
gradaciones intermedias.

  -- Antonio Muñoz Molina, Ventanas de Manhattan





More information about the talk mailing list