Welcome Guest, Not a member yet? Register   Sign In
stensi's Datamapper: how to get first record after ->all()
#1

[eluser]marcello romani[/eluser]
Hallo,
I'm using stensi's DataMapper ORM.
How can I retrieve the first record of a dataset when I have called ->all ?
Example:

$p = new Project();
$p->get();
$dataset = $p->all

if (count($dataset) == 1) {
$first = $dataset[0]; // here lies the question
}


Thank you in advance.




Theme © iAndrew 2016 - Forum software by © MyBB