Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetchPairs improvement #3

Closed
bystac opened this issue Dec 7, 2010 · 1 comment
Closed

fetchPairs improvement #3

bystac opened this issue Dec 7, 2010 · 1 comment

Comments

@bystac
Copy link

bystac commented Dec 7, 2010

can you add ->fetchKey('some_key') it's will be similar to fetchPairs but embed all row
function fetchKey($key) {
$return = array();
foreach ($this as $row) {
$return[$row[$key]] = $row;
}
return $return;
}

Now I can overcome the missing joins functionality
$leads = $nORM->leads()->where($criteria)->order('leads.id DESC');
$leads_data = $nORM->leads_data()->where('lead_id', $leads)->fetchKey('lead_id');

@vrana
Copy link
Owner

vrana commented Dec 7, 2010

Allow returning whole row from fetchPairs, closed by 5c006aa

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants