PHP
- 5 ответов
- 0 вопросов
1
Вклад в тег
SELECT
CASE
WHEN FirstField LIKE '*о*' THEN FirstField
WHEN SecondField LIKE '*о*' THEN SecondField
END AS Field
FROM Table
WHERE FirstField LIKE '*о*'
OR SecondField LIKE '*о*';
SELECT DISTINCT
CASE
WHEN t1.FirstField LIKE '*о*' THEN t1.FirstField
WHEN t2.SecondField LIKE '*о*' THEN t2.SecondField
END AS Field
FROM Table t1
LEFT JOIN Table t2 ON 1=1
WHERE t1.FirstField LIKE '*о*'
OR t2.SecondField LIKE '*о*';
Undefined array key "perem" on line 49
$perem = $data['perem'];- вот тут у тебя нет в массиве data (а это переданный массив POST) нужной переменной.
var_dump($data);
exit;
$perem = $data['perem'];например и посмотри что там в принципе лежит (если будешь дергать из браузера то надо смотреть в разделе network response)
Content-type: application/json
addTableNote($conn, $_POST);
$data = json_decode(file_get_contents('php://input'), true);
addTableNote($conn, $data);
/**
* @param {string} s
* @return {boolean}
*/
var isValid = function (s) {
//hash function for partheses
let map = { "}": "{", "]": "[", ")": "(" };
let temp = [];
//Iterates
for(i in s){
//if a index that matches a closing bracket - continue
if(s[i] in map){
//if the temp isn't empty, and the top of the stack is that closing bracket - pop it
if(temp.length > 0 && temp[temp.length-1] === map[s[i]]){
temp.pop();
}
//else we break it - return false
else{
return false;
}
}
//else we push the opening bracket onto the stack
else{
temp.push(s[i]);
}
}
//else we return true if the temp is empty
return temp.length === 0;
};
<daughter-component
@nextStep="nextStep"
></daughter-component>
valdiateStep(currentStepIndex){
this.$emit('nextStep'); // если надо передать параметр то this.$emit('nextStep', param);
}