n3mesis125 Posted November 24, 2008 Share Posted November 24, 2008 Hey, Just need some help with getting my column data to show as a string. I inserted a bunch of data using phpmyadmin LOAD INFILE, however one of the columns of data I inserted wasn't wrapped with "" to show it was a string. So at this point I'm not even sure what mysql is making this column appear to be. Is there some quick way of fixing a column so that it reads as a string. Right now when I bring the data into an array in php, I am using an if statement like if($a['name'] == "BREAK") however, this isn't working because the word BREAK that is stored in the 'reason' column isn't looking like text, I've tried putting (string) in front of the data i bring into the array but that isn't working. However, if I edit the row in phpmyadmin and then just hit go, it fixes the data, however, I have over 100,000 records and do not want to have to edit each row in phpmyadmin. Thanks, n3m. Quote Link to comment https://forums.phpfreaks.com/topic/134072-convert-mysql-column-to-string/ Share on other sites More sharing options...
fenway Posted November 26, 2008 Share Posted November 26, 2008 LOAD INFILE can handle optinally enclosed fields... did you try this? Quote Link to comment https://forums.phpfreaks.com/topic/134072-convert-mysql-column-to-string/#findComment-699640 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.