Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    MYSQL




Saving Text In Russian


I have a table with a field that is to save text in Russian. The text is
then retrieved by a PHP page. I run a query passing text in windows-1251
encoding, but when I retrieve it from the db, it shows up all wrong.
Does anyone know what the problem is?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Storing Russian Text In Table
I am using MySQL 4.0.20a. A russian user enters text in a HTML-textfield and POSTs & inserts through a PHP-script (php v.5). In what encoding is it stored in mysql? To me, it doesn't look russian but like this:

Âûïîëíèòü çàäàíèå

Is this format OK to store in? If I want to use the text into another page (and select from mysql), do I have to store it in any encoding?

Russian Characters
my.conf:
[client]
...
default-character-set = cp1251

[mysqld]
...
default-character-set = cp1251

still russian characters are displayed as ?????
MySQL 4.1.14-max-log

Unicode For Russian
I just wanted to insert Russian data in my database but while I insert it it get inserted easily, since I believe the data is inserted in the default format i.e. UTF-8 Unicode (utf8) i believe this is the default format but when i select it from database i could not get what was desired what is the solution for this, I am using Php as server side language.I get? as a result of select and while i look it in phpadmin the result is the same, is this the browser problem...which is not supporting the font.

Version 3.23 - Russian Character Set
Have issues inserting Russian charaters in a table. The array used for the insert appears to be fine. The supported character sets per Varibales are:

latin1 big5 czech euc_kr gb2312 gbk sjis tis620 ujis dec8 dos german1 hp8 koi8_ru latin2 swe7 usa7 cp1251 danish hebrew win1251 estonia hungarian koi8_ukr win1251ukr greek win1250 croat cp1257 latin5.

Russian Language (win-1251) At Export MySQL 4.1
I have a problem with mysql back-up of my site. At site is present the material in russian language (the coding WIN-1251). Presently, hosting company has done upgraid MySQL bases to version 4.1.

The Site works orderly, but when making back-up bases (Export), in the base are absent the symbols in russian language. At export of the base through PHPMYADMIN , the situation a bit better, some cyrilic symbols are seen, but not all. How it is correct to do the MySQL export to were seen cyrilic symbols?

Storing English/Japanese/Russian Characters
what is the best collation to be used for a field that will hold characters from various languages. It could be a set of characters from any of the following languages and different rows could hold different languages:

* English
* Japanese
* Russian
* Spanish
* Portugese
* German

Mysql Client Dont Write Russian Characters
I installed MySQL 5.0.24 and have so problem.I can't type russian characters in mysql client. Database has data in koi8 encoding (from dump, from php form...) and this data correctly shown.But when I switch encoding to russian in mysql client cursor stops moving independent from my keys pressing,when switch it return to English and typing continued.For example,I enter: select fld from tbl where fld="russ",if "russ" in koi8 I cann't type this characters.
It is possible type russian characters from OS command line: mysql -p -e "select fld from tbl where fld='russ'" dbname. In this case whole query text will be entered and correctly executed.
If anybody know how possibly decide this problem write me please.
My OS is ALTLINUX 3.0 : LANG=ru_RU.KOI8-R
MySQL's variables:
| character_set_client | koi8r
| character_set_connection | koi8r
| character_set_database | koi8r
| character_set_filesystem | binary
| character_set_results | koi8r
| character_set_server | koi8r
| character_set_system | utf8
| character_sets_dir | /usr/local/mysql-standard-5.0.24-linux-i686/share/mysql/charsets/ |
| collation_connection | koi8r_general_ci
| collation_database | koi8r_general_ci
| collation_server | koi8r_general_ci

Saving PDF In Database
I am trying to save PDF files in a database. I have made an upload page with PHP and interface the database with SQLyog to do the design and other things as well. When I upload my file using my upload page it uploads everything just fine (images, excel files, and pdf files). However when I try to download them via another php page everything works but the PDF files are corrupted somehow.

The error I get in Adobe PDF: "There was an error opening this document. The file cannot be found"

I then try and get the files thru SQLyog and the same problem. Right now I have them being saved in a longblob. Is this the right data type? Why would everything work but PDF files?

Saving A Database
I just started using MySql and I am lost. I understand how to put all the info in the command box but I need to know how to save it so I don't have to start all over. Also how do I open it again?

Saving .avi Into Database
how to save or store .avi into database

Saving Backward Slash
I don't know exactly "" is called forward slash or backward slash.
But I guess it is called backward slash

I like to save it into my database with the following code.

update myTable
set topic=��'
where ID=1
But
��' is actually saved, instead of ��.'

I don't know why the backward slash is not saved in myTable.

How can I save it?

Saving Query Results
Is there any way to save the results of a query without the quote marks?
When i try to import the text file that I saved the query to, I have to go thru and delete all of the quote marks.

Saving Random Query
I want to select about 10 rows randomly from my table every day. I know how to randomly select rows, but is it possible to save that select so that I get the same 10 randomly selected rows again?

Saving Mysql Db To Access?
is it possible? with which tool?

Saving And Using Email Addresses?
I am developing an application that will store contact information. One of the values will be an email address. I would like the user to be able to do a search and if the email address is returned be able to have it returned as a link that they can click on and create the email message. In otherwords, I would like them to be able to send the email directly from the results and not have to copy and paste it into their email client. MS Access allows you to use a Hyperlink data property. Is there anything similar in MySQL? Can anyone advise me on the best way to do this?

Saving Database To File
How would you go abouts saving all data in the mysql to a file and download it? I know how to retreive the data and write it (dont know how to make a download button) but how do i record the table data, such as make them inserts like you would in phpmyadmin.

Then with a click of the button in mysqlsave.php, it retrieves the information, saves it to mysqlDATA.doc and then downloads it to your hard drive?

Saving An SQL File For Uploading
I have saved a create table script, but have noticed that it appears to be only as a TXT file rather then SQL file typ. How do i change this extension so that i can get SQL to find it?

Daylight Saving And CONVERT_TZ
So here's kind of a weird deal... I'm adding a timezone feature to an existing system and since all of the datetimes are stored in MySQL tables I'm planning on storing all datetime values as Grenwich times (+0:00) and then using MySQL's CONVERT_TZ() function, I will convert that time to the timezone the user has set his profile to use. Example, CONVERT_TZ(create_ts, '+0:00', '-5:00') to display a datetime in the Eastern time zone.

So the weird deal is, what is going to happen between the date the Grenwich timezone comes off of daylight saving time (October 29th 2am I think) and the time U.S. timezones are still on daylight saving time (thanks to silly congress)? Will the CONVERT_TZ() function make the adjustment?

I did some testing using the datetime 2007-10-28 23:00:00 and it does not seem to give an extra hour.

SELECT CONVERT_TZ('2007-10-28 23:00:00, '-5:00', '+0:00')
//returns 2007-10-29 04:00:00 (does not give the extra DST hour)

Is this going to be a problem?

Best Practice When Saving Different Datatypes
I am working on a system where I need to save data from a questionnaire that will be of different datatypes either an integer, a boolean/bit or a text value (string to text size).

Currently I am working on a model where I create two tables to hold the different datatypes and a column in the question's table to indicate whether the answer should be stored as an integer or a string.

Is there some better way to do this? As far as I know I shouldn't create one column to hold all datatypes since the overhead of using a text column to store small integer values (eg. 1-5) would be enormous(?)

Mostly the answers will be in the form of small integers like 1-5 or 0-100.

Saving Foreign Characters
For some reason my tables dont seem to store foreign characters. Am I using the wrong data type?

Saving Content On Database
i need to know this because i am making a movie website. I could make every movie on a single html page but then i would create thousands of them which isnt really handy. So i am looking for a way to save content into my database + a image for every movie. Is this possible? adding content and images on databases and then show them in html pages (with php linking)?

if so, could someone plz explain how i can do this and what the php linking code is? In the html files i need a code like:
get/fetch #31
and 31 is for example The Aviator. It imports the image and content and its done. Now i dont need to edit the html file, except adding that code.

Saving Rows Into A File
I did search the forum but I found nothing.
Is there a SQL function that selects specific rows from a table and saves them into a file as SQL statements, which can then be executed later?
I basically want to save sme rows as a set of INSERT statements incase they get deleted and need to be restored.
This is intended as a tool for the client-tier so I would like the file to be created on their machine - not on the host server.

Saving Images In A Table
is it possible to save a whole image-file in a mySQL table? I mean I know that I could e.g. save a file by ftp to the server and save the url to that file in a mySQL table, but I wonder wether it´s possible to save the file itself in a mySQL table and if so, how?

Comparing Two Tables And Saving The Differences In Another
I am trying to take a new table of info and compare it to an existing table. (both are lists of names and ssn's.) The missing ones are the ones needed to put in to the existing. I also have to add some dates and payment info not in the existing.
So.

I cannot find the comparison method that outputs the nameLast and nameFirst that is in one table but not the other.

Saving Databases In User Directories
I would like store user databases in their user directory (/home/username/Databases/dbname/)
and I know I can use symlinks, but I find that very cludgy. Is there something in mysql that
is similar to apache's setup where I can specify a home path to the public_html location or
in this example, a database location?

I am using version 4.0.13 on Red Hat Linux 9.

Saving Storage Space On Blank Entries In DB
If I have a table, of say.... people, with their names, ages, addresses
etc., and some lines in the table have the ages BLANK, how do I make
sure that the blank fields are not taking up disk space? Does OPTIMIZE
TABLE do this, or is another command?

Connector/ODBC Not Saving Port Setting
Using MySQL Connector/ODBC 3.51, I set the port to a non-default value
(3309), under 'Connection Options' to connect to a remote machine running 2
versions of MySQL. 'Test' is successful but when I close the Connector/ODBC
window on XP the port setting is not saved so the DSN doesn't work.

Saving Geocode Information, What Data Type?
What data type is best to use to save Latitude and Longitude information? If I use float, I only have precision 4 (xx.xxxx). I can't use text because I want to do calculations with it. What data type are you all using?

Saving A Div With An Image Makes Mysql Table Garbled
I wrote a script in php, the script takes all the divs in a page, pouts then in an array then save to a mysql blog.

Works like a charm if there are no images in the divs, but if I insert an image with insertImage() then save, the table gets all garbled, outputing an error when read.

Problem Saving Javascript Content In MySQL Database
I have been using MySQL for eight years now, but the problem I am having has me feeling like a newbie.

I am the owner and operator of a busy message board website. I recently moved over to a new dual Opteron 2218 system. When I built out the box, I install MySQL version 5.0.32. Since this changeover, I am unable to add any content containing HTML Javascript script calls to any database field. When I try to do so, the request simply times out. I have tried to update DB info using the template editing system in vBulletin and tried to add data via PHPMyAdmin, with the same results. Not only can I not add such content, I cannot modify or edit any data field that already contains any HTML markup using script tags to call a Javascript process. I am baffled.

If anyone has any idea why this could be happening, I would really appreciate hearing it. My site is operational now, but I cannot make any modifications to it or add any Javacript banners until I resolve this issue.

Auto Saving Results From Query Browser Into Excel Format
Is there a way I can save the output(s) of select statements (in query browser) to excel files directly , so I can run this as stored procedure or script? (I have quite a few queries and wanted to automate the process so anyone can do it.)

Guests Saving Information To A Databse And Linking DB Data To Accounts
When someone logs into my site, they can generate an image. I would want them to, after logging in, be able to click a link (or button) that would save the image(url) in a DB. Then, by visiting another page, they could visit all the images they have saved(urls) which would recall them based on their username.

Exporting Blob / Text Column With Hyphen Delimited Text
I have a table that contains a column (blob, text type, formatted as MEDIUMTEXT) with text hyphen (-) delimited, listing

rooms by numbers, and I need to export or insert that data into another table, where all other info on the other columns

remains the same, but I need the data on the blob field to be single listed

another words, i have a table like this (example):

School Rooms
Your Hometown High School 1034-1035-1037-1039
My Hometown High School 208-178-1432-1728

I need it like this:

School Rooms
Your Hometown High School 1034
Your Hometown High School 1035
Your Hometown High School 1037
Your Hometown High School 1039
My Hometown High School 208
My Hometown High School 178
My Hometown High School 1432
My Hometown High School 1728


Automatically Generate Text Excerpt For Text Near Keyword Hits?
I would like to generate an automatic text excerpt showing the text close to the first occurance of a keyword needle in a text haystack.

For example: searching for

keyword = "foo"

in a table called Webpages in the column Content = "Yadda, yadda, yadda. Bla, bla, bla foo yadda yadda yaddda bla bla bla"

would return a column called Excerpt = "...a, bla foo yadda yadd..."

Is this best done with PHP after fetching the entire column Content, or will it be more efficient to do directly with MySQL?

What would that SQL query look like?

Need To Insert Data From A Text File Into A Medium Text Field.
How can I go about inserting data into a MEDIUMTEXT field from an existing text file using Java.

Exporting Blob / Text Column With Hyphen Delimited Text
I have a table that contains a column (blob, text type, formatted as MEDIUMTEXT) with text hyphen (-) delimited, listing

rooms by numbers, and I need to export or insert that data into another table, where all other info on the other columns

remains the same, but I need the data on the blob field to be single listed another words, i have a table like this (example): Code:

How To Insert New Text At Specific Point In Text Field?
I'd like to insert "rackmount" in a database text field in front of "radio." The term "radio" appears in each "description" column but it is surrounded by other, random, text. Is there a way to accomplish this?

Help: Replacing Same Text With New Text In Hundred Rows
I have about a couple hundred email addresses in a table... every email address includes @domain.com (the same domain). However, that domain is changing to a new domain... and I need to replace only the @domain.com to @newdomain.com.
Any ideas how I do that? Ie.. a table might look like this:
ID -- email
1 -- aaron@domain.com
2 -- brian@domain.com
3 -- chase@domain.com
needs to change to
1 -- aaron@newdomain.com
2 -- brian@newdomain.com
3 -- chase@newdomain.com


Insert Text File In A Text Field
2 questions:

1) How can I insert a text file into a TEXT field (of a table)
by a mysql instruction ?;

2) How can I insert a microsoft word file into a BLOB field (of a table)
by a mysql instruction?

Converting Database Text To Html Text
Is there a function in MySQL or PHP that will automatically convert a text with paragraphs etc. to an html ready text. i.e. a function that will add <p> tags etc.

Adding Text To Existing Text
I am trying to add a string of text to the end of text that is already stored in the DB.

For example
likes = "I like television"
is already stored in the DB

The user then wants to add "-I like music".

So I want the end result to be:
likes = "I like television-I like music"

I tried:
UPDATE table SET likes = likes + "-I like music"
but that gives me an error and only works for numbers

What is the text equivilent of adding to an existing field?

Full Text Index And Full Text Search On Several Columns And Indivdiual Columns
1. Say if I want to do the full text search on three columns, "title", "description", "keyword". The search could be done only on one column, or combine any two columns, or combine all three columns, do I need to create full text index for all these possiblilities, like full text index on each column, and then full text index on any two columns and then full text index on all three columns?

If I have to make so many different kind full text index, that will slow my database performance or not?

2. Will the relevance also be calculated based on which column, such as the "title" will have higher relevance than "keyword", the "keyword" will have higher relevance than "description"?

Text + Text
i was wondering if it is possible to add text to an excisted text
whit an number it is possible

UPDATE `forum` SET `number` =`number` + 1

but is this also posseble whit text
UPDATE `forum` SET `text` =`text` ?? 'example'

Bin Log --&gt; Text
Generally, I use mysqlbinlog to read MySQL binary log files, but I don't think that's convenience.

Can I convert binary log file to text file? How to?

Use Text ID
How do I create a table that has a TEXT ID in mySQL?  In other words, what query/how do I make it so the address mydomain.com/page.php?username=jsmith (instead of something like mydomain.com/page.php?id=12)?  Also, what would be the PHP query to pull up a record with such a table?  

Showing Text Instead Of Img
just set up a new table with some imgs in it and when i go to display them, it just shows the img name and not the img.

my database field is blob BINARY, or should it be unsigned, unsigned zerofill?
whats the diffrence?

Cannot Add Long Text To DB
can anyone help I have built a very basic news feature - which allows users to add news stories to a website.

However, the MySQL database doesn't seem to be accepting multiple paragraphs of text it only accepts one or two words.

I have altered the field to longtext - but it doesn't make any difference.




Text Vs Varchar
I have a table that contains preferences, most of which are integers or small text fragments, so I've been able to get by with a varchar(255) field for the data -- until now.

Would I face any penalties if I were to switch the varchar field to text? Or, is there another option that would allow for more characters to be inserted into that field?

FULL-TEXT Vs. LIKE
I'm attempting to write a simple search for a website I'm developing. Basically, the search will look for matches in "artist_name" and "album_title" in my table, "music". Simple enough, no?

Which search method is more effective, FULL-TEXT indexed searching or simply using LIKE in my MySQL query? Note that the table will eventually have thousands if not tens of thousands of rows.

From what I've read, FULL-TEXT appears to be geared towards searching for text in longer articles, whereas the most my MySQL fields will contain is a couple of words.

I wrote a quick script using FULL-TEXT, and the results are pretty ambiguous already. I've added 5 rows of records to the table, and searching for the album "Very Fast Very Dangerous" using just the word "Very" yields zero results. I assume it's because the word occurs twice in the record. However, since this doesn't constitute over 50% of the records in the table, why is this?


Copyright © 2005-08 www.BigResource.com, All rights reserved