• zoner.sk
  • SlovakNET.sk
  • inshop.sk
  • interval.cz
  • inmail.sk
  • fotoskola.sk
  • zonerpress.sk
Administration Center | Help | About us
  • Home
  • Domains
  • Webhosting
  • E-commerce
  • Customer support
Search:   |List all help topics|FAQ| česká verze slovenská verzia english version
The Index Of The » Webhosting » Database » Check the MySQL database » To check the version of the MySQL database to check check check and check the Czech 4.1.
  • Check the source code to check the example to check with or windows-1250
  • Check the source code to check the example to check with check utf-8

Database MySQL version 4.1 and the Czech

The database on the server with the version of the MySQL version 4.1 is established without the set default character set (i.e.. Latin1).

For the correct operation of the Czech characters it is necessary that the user has set the character set in which the database is encoded in. It shall carry out, for example. through the phpMyAdmin SQL command:

ALTER DATABASE database_name
DEFAULT CHARACTER SET cp1250
DEFAULT COLLATE cp1250_czech_cs;

The following user database database_name set default encoding to windows-1252 (cp1250) and grading of the Czech, which distinguishes the size of pímen.

Another example is possible to set the character set UTF-8 and the Czech sorting, case-insensitive (dopručujeme all):

ALTER DATABASE database_name
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE utf8_czech_ci;

If vytvořítme then the following table with two columns ID and value:

CREATE TABLE cz_test
(ID INT NOT NULL AUTO_INCREMENT,
value VARCHAR (255) COLLATE utf8_czech_ci CHARACTER SET utf8, PRIMARY KEY (ID)
) TYPE = MYISAM CHARACTER SET utf8 COLLATE utf8_czech_ci;

the problem is not to insert the Czech characters correctly and works and classification of characters such as "ch".

In the further examination of the manual page you will find that the character set to be transmitted to the server can be modified through the HUNDRED NAMES-see http://dev.mysql.com/doc/mysql/en/set-option.html

For output in the appropriate encoding (e.g., windows-1250) on a Web presentation you need to specify the connection after the normal command MySQL_Query ("SET NAMES ' cp1250 '");

This part of the code might look like for the connection to the database:

$link = MySQL_Connect("adresa_databazoveho_serveru", "nazev_uzivatele", "heslo")
or die("Nelze se připojit"); //připojení k serveru
MySQL_Select_DB("nazev_databaze") or die("Nelze vybrat databazi"); //výběr databáze
MySQL_Query("SET NAMES 'cp1250'"); //překóduje DB do windows-1250

// .....další příkazy a dotazy na databázi

MySQL_Close($link); //ukončení spojení


Under the bounce in the top of the page are two examples for the encoding windows-1252 and utf-8.

The man pages (Chapter 10. Character Set Support): http://dev.mysql.com/doc/mysql/en/charset.html

How satisfied are you with the quality of this help? 0% 25% 50% 75% 100%
Feedback: Send us your views on this page - this will help us improve its quality.

This form is only to improve the quality of help and so please do not expect a response from our technical support. Thank you for your understanding.

Team of customer support
Write one hundred:
  • Home
  • Domains
  • Webhosting
  • E-commerce
  • About us
  • Customer support
  • Partners
  • Administration account
Facebook - ZONER software, a.s.

Webhosting| Domain| Web pages| SSL| CZ domains| EU domains| FREE Website| Gallery

Customer support 24/7 tel.: 603 196 637, 543 257 018|Contact information|Contract conditions|© ZONER software, a.s.