SELECT
product_id,
SUM(CASE WHEN `param_key ` = 'param1' then `value` END) param1,
SUM(CASE WHEN `param_key ` = 'param2' THEN `value` END) param2,
SUM(CASE WHEN `param_key ` = 'param3' THEN `value` END) param3,
SUM(CASE WHEN `param_key ` = 'param4' THEN `value` END) param4,
SUM(CASE WHEN `param_key ` = 'param5' THEN `value` END) param5
FROM product_parameters
GROUP BY product_id
async function createFile(){
let response = await fetch(uri);
let data = await response.blob();
let metadata = {
type: 'audio/mpeg-3'
};
let file = new File([data], "questionAudio.mp3", metadata);
const formData = new FormData();
formData.append('audio-file', file);
formData.append('action', 'sendBlob');
return $.ajax({
url: document.location.href,
data: formData,
processData: false,
contentType: false,
type: 'POST',
success: function(data){
var res = JSON.parse(data, true);
resField.val(res);
}
});
}
createFile();
<img data-pdf-thumbnail-file="/assets/news/pdf/teambuilding_210821.pdf" />