SELECT COUNT(t.id) FROM
`StoreProduct` t,
`StoreProductAttributeEAV` eavb0,
`StoreProductAttributeEAV` eavb1
WHERE
((eavb0.entity = t.id AND
eavb0.attribute = 'thickness' AND
eavb0.`value` = '49')
OR
( eavb1.entity = t.id
AND eavb1.attribute = 'label'
AND eavb1.`value` = '39')) AND
`t`.is_active=1
select distinct on field1 *
from 'table'
const connection = mysql.createConnection({
host: 'localhost',
user: 'root',
password: 'password',
database: 'my_db' <===============
});
&& tset REGEXP '[[:<:]]1[[.plus-sign.]]1[[:>:]]'
function __destruct(){
/* Освобождаем результаты запроса */
empty($this->dbresult) || $this->dbresult->close();
/* Иногда результатов запроса несколько освободим их тоже */
while ( self::$db->more_results() && self::$db->next_result() && self::$db->store_result() );
if ($this->connected && self::$db) {
/* Закрываем соединение */
self::$db->close();
self::$db=NULL;
$this->connected=false;
};
}