mysql blob problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: mysql blob problem (/showthread.php?tid=37340) |
mysql blob problem - El Forum - 01-06-2011 [eluser]quasiperfect[/eluser] hi i'm going nuts over a problem i'm having i have a blob field that contains my session data on local server (windows7 wamp64) when i run a select over the data from the blob field i get all contents in text format something like this Code: mysql> select session_data from sessions; on my live server (centos)i get something like this Code: mysql> SELECT session_data FROM sessions; what i'm doing wrong here ? any idea what the problem could be ? update i forgot to mention the application works correctly on both servers my problem is when i try to do a select on the blob Code: SELECT session_data FROM sessions where session_data like '%sometexthere%' mysql blob problem - El Forum - 01-06-2011 [eluser]Victor Michnowicz[/eluser] Weird. I would make sure that your database character set and collation are setup correctly in CodeIgniter. I know CI defaults to "utf8_general_ci" for the collation while a lot of servers default to "utf8_sweedish_ci." I don't know if this would cause the problems you are having, but it is worth a shot. mysql blob problem - El Forum - 01-06-2011 [eluser]quasiperfect[/eluser] thanks for u'r suggestion on the server phpmyadmin reports utf8_general_ci in ci config i have Code: $db['default']['char_set'] = 'utf8'; so i don't think that's the problem mysql blob problem - El Forum - 01-06-2011 [eluser]Victor Michnowicz[/eluser] Are you sure it says "utf8_general_ci"? In your example code it says "utf8_general_". There is no "ci" part. Assuming varchar fields work correctly - If you are on MySQL 5.0.3 or later, varchars can be anywhere from 0 to 65,535 characters (prolly more than enough for what you need) mysql blob problem - El Forum - 01-06-2011 [eluser]quasiperfect[/eluser] sorry i just copied wrong i converted the field to text same thing on windows i see the text even with phpmyadmin on linux no luck tested on 2 servers |