Welcome Guest, Not a member yet? Register   Sign In
DataMapper - how to perform basic query
#6

[eluser]Genki1[/eluser]
And, to assist others, the solution provided above is the shorthand for this:

Code:
$u->setting->where('name', 'has_allowed');  // filter the related table "settings"
$u->setting->include_join_fields();  // include columns from the join table in the result set
$u->setting->get();                  // perform the query
echo $u->setting->join_value;        // display the field "value" from the join table


Messages In This Thread
DataMapper - how to perform basic query - by El Forum - 06-15-2011, 10:50 AM
DataMapper - how to perform basic query - by El Forum - 06-15-2011, 12:22 PM
DataMapper - how to perform basic query - by El Forum - 06-15-2011, 01:06 PM
DataMapper - how to perform basic query - by El Forum - 06-15-2011, 02:23 PM
DataMapper - how to perform basic query - by El Forum - 06-15-2011, 02:36 PM
DataMapper - how to perform basic query - by El Forum - 06-15-2011, 03:15 PM



Theme © iAndrew 2016 - Forum software by © MyBB