GROUP BY
не отменили же вроде.SELECT p.* FROM p
LEFT JOIN pt ON p.id_p=pt.id_p
WHERE p.id_p=262 AND pt_val IN (4447, 4448)
GROUP BY p.id_p
<?php
$str = "ЭНИ-601[2к[10Вт;20Вт];4к[10Вт;20Вт;30Вт];8к[70Вт;80Вт]];";
$str = preg_replace("#([а-яА-Я\d\-]+)#u","\"\$1\"",$str);
$str = str_replace(array("[","]"),array(":{","}"),$str);
$str = preg_replace("#\{([^{};]+?(;[^}]+?)*?)\}#u","[\$1]",$str);
$str = str_replace(";",",",$str);
$str = '{'.substr($str,0,-1).'}';
print_r(json_decode($str,true));
echo PHP_EOL;
Array
(
[ЭНИ-601] => Array
(
[2к] => Array
(
[0] => 10Вт
[1] => 20Вт
)
[4к] => Array
(
[0] => 10Вт
[1] => 20Вт
[2] => 30Вт
)
[8к] => Array
(
[0] => 70Вт
[1] => 80Вт
)
)
)
property iTunesRunning : false
property iTunesState : ""
tell application "System Events"
if "iTunes" is in (name of application processes) then set iTunesRunning to true
end tell
if iTunesRunning then
tell application "iTunes" to set iTunesState to player state as string
else
set iTunesState to "not running"
end if
return iTunesState
not running | playing | paused | stopped