I have a database issue, that I'm unable to understand. I'm from Denmark and have made a sign-up system in PHP and MySQL. Now... I have made two tables seperately.
One of the tables (let's call it table1
) displays my beloved danish letters (æøå) just fine, when I'm querying them from the database through PHP. But when I go to phpMyAdmin, then the letters are displayed wierdly... For instance: It looks like this in phpMyAdmin:
Bjørn (which is Bjørn)
But the again, when I get them from the database with a mysql_query('SELECT * FROM $tablename')
, then it is displayed as 'Bjørn' (as it should).
Now to the problem...
In the other table (let's call it table
2), then in phpMyAdmin 'Bjørn' is displayed as 'Bjørn' (what seems correct). But when I pull it into PHP with mysql_query('SELECT * FROM $tablename')
then it is displayed as 'Bj?rn'. All of the letters 'æøå' is displayed as a '?'.
I tried doing a SHOW TABLE STATUS
, and it shows that the Collation is the same.
In table1
, then the variables are VARCHAR(255)
, while in table2
, the variables are TEXT
.
Both tables are created like this:
CREATE TABLE >>tablename<< ( bla bla bla ) CHARSET=UTF8