how to get content from a TEXT column in mysql? [closed]
Вопрос
maybe dumb question but if I have a table with a MEDIUMTEXT column how do I query that table and see what the actual content is? eg SELECT text FROM PRIMARY_TEXT WHERE id = 1
. What I get back now is [object Object]
.
thanks for your help.
UPDATE my table definition:
CREATE TABLE `primary_text` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`active` tinyint(1) NOT NULL,
`text` text NOT NULL,
`card_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `card_id` (`card_id`),
CONSTRAINT `source_text_ibfk_1` FOREIGN KEY (`card_id`) REFERENCES `cards` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
Решение
[object Object]
sounds like an "Object" was inserted instead of a "string". Such can happen if you are not careful in JavaScript and several other languages.
Не связан с dba.stackexchange