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
mysql phpmyadmin
New contributor
add a comment |
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
mysql phpmyadmin
New contributor
What is your MySQL server version ?
– Madhur Bhaiya
yesterday
@MadhurBhaiya MySQL version is 5.6.41
– Zied BM
yesterday
add a comment |
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
mysql phpmyadmin
New contributor
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
mysql phpmyadmin
New contributor
New contributor
edited yesterday
Ina Plaksin
1172
1172
New contributor
asked yesterday
Zied BM
82
82
New contributor
New contributor
What is your MySQL server version ?
– Madhur Bhaiya
yesterday
@MadhurBhaiya MySQL version is 5.6.41
– Zied BM
yesterday
add a comment |
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
add a comment |
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'));
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
add a comment |
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'));
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
add a comment |
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'));
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
add a comment |
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'));
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'));
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
add a comment |
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
add a comment |
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.
Zied BM is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
What is your MySQL server version ?
– Madhur Bhaiya
yesterday
@MadhurBhaiya MySQL version is 5.6.41
– Zied BM
yesterday