Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 9th, 2012  |  syntax: None  |  size: 0.52 KB  |  hits: 26  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. MySQL 5.1 - Converting Blob to Text
  2. CREATE TABLE `sessionparameter` (
  3.     `sessionId` INT(11) NOT NULL,
  4.     `serialValue` TINYBLOB NOT NULL,
  5.     `name` VARCHAR(255) NOT NULL COLLATE 'utf8_unicode_ci',
  6.     PRIMARY KEY (`sessionId`, `name`),
  7.     INDEX `fk_sessionparameter_session` (`sessionId`),
  8.     CONSTRAINT `fk_sessionparameter_session` FOREIGN KEY (`sessionId`) REFERENCES `session`     (`id`)
  9. )
  10. COLLATE='utf8_unicode_ci'
  11. ENGINE=InnoDB
  12. ROW_FORMAT=DEFAULT
  13.        
  14. SELECT CONVERT(serialValue USING utf8) FROM sessionparameter;