views:

36

answers:

1

I'm currently again working on a program from when I was, umm... less capable. It has a number of problems:

  • The database collation is latin1_swedish_ci. I would like to convert it to utf8. How would I do this?
  • The database has some fields that are boolean values stored as 0 or 1. However, the fields are varchars instead of bools. How can I convert these?
+1  A: 

Hi,

ad 2) you can export your table using sqldump or "SELECT * INTO OUTFILE xxx from MYTAB;", recreate the table and reimport, optionally after manipulating the exported data (converting 1/0's to true/false etc.)

ad 2) you can create a new bool field and UPDATE tab SET NewBool=True where OldVarChar="1"; etc.

MikeD