Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.