Jump to content

phpmyadmin utf8


Isset1988

Recommended Posts

Hello, i have this script to update my database.

 

<?php
include("connector.php");

mysql_select_db("Table", $con); 


$sql = "UPDATE Persons SET FirstName='something not on english character' WHERE FirstName='test' AND LastName='test2'";

mysql_query($sql);


// Close connection
mysql_close($con);
?>

 

I have a utf8_general_ci database and i create a table with uft8 columns

 

<?php
include("connector.php");

// Sql query
mysql_select_db("Table", $con);
$sql = "CREATE TABLE Persons
(
Id int NOT NULL AUTO_INCREMENT,
FirstName varchar(15) NOT NULL,
LastName varchar(15) NOT NULL,
PRIMARY KEY (Id)
)CHARSET=UTF8";

// Execute query
mysql_query($sql,$con);

// Close connection
mysql_close($con);
?>

 

When i try see the includes of columns in phpmyadmin, i see these symbols ????????.

I know that is not a problem, because when i select and print my table on a utf8 charset php page, everything shows nice.

 

Is there any way to see columns on utf8 when i access to phpmyadmin?

 

 

Thank u! :shy:

Link to comment
https://forums.phpfreaks.com/topic/265409-phpmyadmin-utf8/
Share on other sites

Try in this wasy:

 

<?php
include("connector.php");

mysql_select_db("Table", $con); 

$sql = "UPDATE Persons SET FirstName='something not on english character' WHERE FirstName='test' AND LastName='test2'";

mysql_query('SET NAMES UTF8');

mysql_query($sql);

// Close connection
mysql_close($con);

?>

Link to comment
https://forums.phpfreaks.com/topic/265409-phpmyadmin-utf8/#findComment-1360727
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.