-1

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

closed as off-topic by mustaccio, Marco, LowlyDBA, Max Vernon, kevinsky Jul 3 at 16:33

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – mustaccio, Marco, LowlyDBA, Max Vernon, kevinsky
If this question can be reworded to fit the rules in the help center, please edit the question.

1

[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.

  • The text '[object Object]' is a string, not an object, that's why a string was inserted, not an object. – Luuk Jun 29 at 7:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.