SELECT * FROM Resources AS Models
LEFT JOIN Resources AS Designs ON (Designs.parent_id = Models.id AND Designs.template_id = id шаблона дизайна модели)
LEFT JOIN Resources AS Batches ON (Batches.parent_id = Designs.id AND Batches.template_id = id шаблона серии дизайна)
WHERE Models.parent_id IS NULL
AND Designs.id IS NOT NULL
AND Batches.id IS NOT NULL
11.22.33.44 baza.site-name.ru
function change(string &$x)
{
$x = trim($x);var_dump($x);
}
$v = " bar ";change($v);var_dump($v);
function change(string &$x0 = "", string &$x1 = "", string &$x2 = "")
{
for ($i = 0; $i < func_num_args(); $i++)
{
$s = "x{$i}";$$s = trim($$s);
}
}
$v = " bar ";$w = " foo ";
change($v);var_dump($v, $w);
change($v, $w);var_dump($v, $w);