Rich
unread,Mar 11, 2009, 2:42:55 AM3/11/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Communit.as Development, Jaybill
I have these methods written for a couple modules, and I like them,
and I think they should be added to the core db table abstract.
Let me know what you think of these ideas...
fetchAllArray($where, $order, $limit, $page)
- Just like fetchAll(), except the output is always an array of
rows, or an empty array.
fetchRowArray($where)
- Same as above except it returns just one row as an array, or an
empty array.
getWhereClauseForKeywords($keywords, array $fieldnames)
- Creates a where clause based on supplied keywords and the names of
the fields to look in.
fetchAllArrayByKeywords($keywords, $fieldnames)
- Combines fetchAllArray with getWhereClauseForKeywords to perform a
keyword search.
It all ends up being relatively little code, and should not affect
existing implementations at all.