is it possible to change column data every time a new raw label added? automatically in phpmyadmin











up vote
0
down vote

favorite












I want to make metatitle automatically using title of the post + text (title+text=metatitle)



UPDATE table_name 
SET metatitle = concat(title , 'text')


is it possible to change metatitle data every time a new raw label added? automatically in phpmyadmin?



I don't have skill to make modification on script










share|improve this question









New contributor




Zied BM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • What is your MySQL server version ?
    – Madhur Bhaiya
    yesterday










  • @MadhurBhaiya MySQL version is 5.6.41
    – Zied BM
    yesterday















up vote
0
down vote

favorite












I want to make metatitle automatically using title of the post + text (title+text=metatitle)



UPDATE table_name 
SET metatitle = concat(title , 'text')


is it possible to change metatitle data every time a new raw label added? automatically in phpmyadmin?



I don't have skill to make modification on script










share|improve this question









New contributor




Zied BM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • What is your MySQL server version ?
    – Madhur Bhaiya
    yesterday










  • @MadhurBhaiya MySQL version is 5.6.41
    – Zied BM
    yesterday













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I want to make metatitle automatically using title of the post + text (title+text=metatitle)



UPDATE table_name 
SET metatitle = concat(title , 'text')


is it possible to change metatitle data every time a new raw label added? automatically in phpmyadmin?



I don't have skill to make modification on script










share|improve this question









New contributor




Zied BM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I want to make metatitle automatically using title of the post + text (title+text=metatitle)



UPDATE table_name 
SET metatitle = concat(title , 'text')


is it possible to change metatitle data every time a new raw label added? automatically in phpmyadmin?



I don't have skill to make modification on script







mysql phpmyadmin






share|improve this question









New contributor




Zied BM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Zied BM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited yesterday









Ina Plaksin

1172




1172






New contributor




Zied BM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked yesterday









Zied BM

82




82




New contributor




Zied BM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Zied BM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Zied BM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • What is your MySQL server version ?
    – Madhur Bhaiya
    yesterday










  • @MadhurBhaiya MySQL version is 5.6.41
    – Zied BM
    yesterday


















  • What is your MySQL server version ?
    – Madhur Bhaiya
    yesterday










  • @MadhurBhaiya MySQL version is 5.6.41
    – Zied BM
    yesterday
















What is your MySQL server version ?
– Madhur Bhaiya
yesterday




What is your MySQL server version ?
– Madhur Bhaiya
yesterday












@MadhurBhaiya MySQL version is 5.6.41
– Zied BM
yesterday




@MadhurBhaiya MySQL version is 5.6.41
– Zied BM
yesterday












1 Answer
1






active

oldest

votes

















up vote
0
down vote













If your MySQL version is 5.7 and above, you can use Generated Columns



For, that you will have to Alter the column as:



ALTER TABLE table_name MODIFY metatitle VARCHAR(255) 
GENERATED ALWAYS AS (CONCAT(title,'text'));





share|improve this answer





















  • i receive this error message #1064 - You have an error in your SQL syntax;
    – Zied BM
    yesterday












  • @ZiedBM please read my answer; it works only when MySQL version is 5.7 and above; however yours is 5.6 ; You should upgrade the version and try again.
    – Madhur Bhaiya
    yesterday











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Zied BM is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53237645%2fis-it-possible-to-change-column-data-every-time-a-new-raw-label-added-automatic%23new-answer', 'question_page');
}
);

Post as a guest
































1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













If your MySQL version is 5.7 and above, you can use Generated Columns



For, that you will have to Alter the column as:



ALTER TABLE table_name MODIFY metatitle VARCHAR(255) 
GENERATED ALWAYS AS (CONCAT(title,'text'));





share|improve this answer





















  • i receive this error message #1064 - You have an error in your SQL syntax;
    – Zied BM
    yesterday












  • @ZiedBM please read my answer; it works only when MySQL version is 5.7 and above; however yours is 5.6 ; You should upgrade the version and try again.
    – Madhur Bhaiya
    yesterday















up vote
0
down vote













If your MySQL version is 5.7 and above, you can use Generated Columns



For, that you will have to Alter the column as:



ALTER TABLE table_name MODIFY metatitle VARCHAR(255) 
GENERATED ALWAYS AS (CONCAT(title,'text'));





share|improve this answer





















  • i receive this error message #1064 - You have an error in your SQL syntax;
    – Zied BM
    yesterday












  • @ZiedBM please read my answer; it works only when MySQL version is 5.7 and above; however yours is 5.6 ; You should upgrade the version and try again.
    – Madhur Bhaiya
    yesterday













up vote
0
down vote










up vote
0
down vote









If your MySQL version is 5.7 and above, you can use Generated Columns



For, that you will have to Alter the column as:



ALTER TABLE table_name MODIFY metatitle VARCHAR(255) 
GENERATED ALWAYS AS (CONCAT(title,'text'));





share|improve this answer












If your MySQL version is 5.7 and above, you can use Generated Columns



For, that you will have to Alter the column as:



ALTER TABLE table_name MODIFY metatitle VARCHAR(255) 
GENERATED ALWAYS AS (CONCAT(title,'text'));






share|improve this answer












share|improve this answer



share|improve this answer










answered yesterday









Madhur Bhaiya

14.1k52035




14.1k52035












  • i receive this error message #1064 - You have an error in your SQL syntax;
    – Zied BM
    yesterday












  • @ZiedBM please read my answer; it works only when MySQL version is 5.7 and above; however yours is 5.6 ; You should upgrade the version and try again.
    – Madhur Bhaiya
    yesterday


















  • i receive this error message #1064 - You have an error in your SQL syntax;
    – Zied BM
    yesterday












  • @ZiedBM please read my answer; it works only when MySQL version is 5.7 and above; however yours is 5.6 ; You should upgrade the version and try again.
    – Madhur Bhaiya
    yesterday
















i receive this error message #1064 - You have an error in your SQL syntax;
– Zied BM
yesterday






i receive this error message #1064 - You have an error in your SQL syntax;
– Zied BM
yesterday














@ZiedBM please read my answer; it works only when MySQL version is 5.7 and above; however yours is 5.6 ; You should upgrade the version and try again.
– Madhur Bhaiya
yesterday




@ZiedBM please read my answer; it works only when MySQL version is 5.7 and above; however yours is 5.6 ; You should upgrade the version and try again.
– Madhur Bhaiya
yesterday










Zied BM is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















Zied BM is a new contributor. Be nice, and check out our Code of Conduct.













Zied BM is a new contributor. Be nice, and check out our Code of Conduct.












Zied BM is a new contributor. Be nice, and check out our Code of Conduct.















 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53237645%2fis-it-possible-to-change-column-data-every-time-a-new-raw-label-added-automatic%23new-answer', 'question_page');
}
);

Post as a guest




















































































Popular posts from this blog

Xamarin.iOS Cant Deploy on Iphone

Glorious Revolution

Dulmage-Mendelsohn matrix decomposition in Python