Jump to content

insert problem


jimath

Recommended Posts

[quote]hi everyone!
i have created a table like this:
table: lessons per exam
columns: lesson_id int(11)
            semester int(11)
            name_lesson varchar(120)
            exam_char varchar(30)
            theory int(11)
            lab int(11)
            state int(11)
            state_char varchar(30)

in this table i want to execute this query:
INSERT INTO `lessons_per_exam` VALUES (10, 1, 'Υπολογιστές', 'Α', 2, 0, 2, 'Προαιρετικο');

and an error message is displayed:
[b]#1406 - Data too long for column 'name_lesson' at row 1 [/b]

in mysql 4.x this query was executed but now in mysql 5 there is this error.
can you help me?
[/quote]
Link to comment
https://forums.phpfreaks.com/topic/18635-insert-problem/
Share on other sites

i tried this but the problem eventually is with the language.
for example:
if i write this:

INSERT INTO `lessons_per_exam` ( `lesson_id` , `examino` , `name_lesson` , `exam_char` , `theory` , `lab` , `state` , `state_char` ) VALUES (9, 1, '[b]Επιστήμη των Υπολογιστών[/b]', 'Α', 2, 0, 2, '[b]Προαιρετικο[/b]');

it is not acceptable.and the message is displayed


whereas if i write this:
INSERT INTO `lessons_per_exam` ( `lesson_id` , `examino` , `name_lesson` , `exam_char` , `theory` , `lab` , `state` , `state_char` ) VALUES (9, 1, '[b]computer science[/b]', 'Α', 2, 0, 2, '[b]optional[/b]');
everything ok.

so the columns accept only the english chars. have you any idea about how i can solve the language problem?
[b]i use phpmyadmin 2.8.2[/b]
Link to comment
https://forums.phpfreaks.com/topic/18635-insert-problem/#findComment-80736
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.