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






SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Dealing With Foreign Languages


mysql dealing with foreign languages such as chinese, french, etc? Are there certain things I have to do to make mysql recognise the foreign languages? Also are there certain things I have to do to view the foreign languages?




View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Dealing With NULL
Is there a why to instruct MySQL to deal with NULL values in a particular way?
For the following query, I want the result to be zero and not NULL if v1 or v2 is NULL:
SELECT t.v1 * t.v2
FROM table1 t;

For the following query, I want no spaces and not NULL to be concatenated if v2 is NULL:
SELECT CONCAT(t.v1," ",t.v2)
FROM table1 t;

View Replies !   View Related
Dealing With Time
I have a database that I have written the time in to (format hh:mm:ss) TIME field MySQL. I also have a DATE field.

I'd like to check and see if the entry is more than 2 hours old, and if so, send an email message. Is there an easy way to compare the current time to the entry and determine if it is more than 120 minutes old?

View Replies !   View Related
Dealing With Constants
I will be using MySQL's math functionallity to solve some fairly long calcuations, and will be using PHP to interface to MySQL. I will have various constants that are used in the equations. Instead of typing the numerical constant each time, I would like to assign a variable to improve troubleshooting, changing the constants, and readability.

I don't, however, want to store my constants in a table or do anthing that will make MySQL slow down each time a query is run. I have done similar things when dealing with a compiled program, but don't know if there are ways of doing this MySQL or PHP.

View Replies !   View Related
Dealing With Mysql Through Perl
i'm working with a mySql database. i have accessed the database through perl.
now i want to know how i can store images in the databases through perl and how to retrieve it..
does anyone have an idea abt this?

View Replies !   View Related
Query Dealing With Distance
I am trying to query a MySql database based on Lat and Long that is stored in the Database using a formula (that I have and know works just need to convert to Mysql) to figure out distance on a globe. The Results need to be within a set distance, say 50 miles from a center point.
Now the question is... What would be the most effienct way of doing this without overly taxes my system resources, as the search could be from a very large table. The search will be limited to no more then 50 returns, from possibly 15K entries to start with.
The only entries in the database that are used in this problem are Latitude and longitude, everything else is just display information for that location. If you need the equation I am using please just ask, it is trig dealing with Cos, sin, and atan2 functions.

View Replies !   View Related
Dealing With A Table Of Keywords
I need to achieve something with the least amount of processing possible and hoping for some advice on the best way forward.

I have a form where users choose a category and submit a list of keywords separated by commas. From this I split the string and create an array of 10 keywords. I also have a database table which relates categories to keywords so category_id and keyword as a composite key. I can't have any repeated relations and I can't have anymore than 100 rows per category_id. So foreach keyword i need to check if it already exists for the given category_id, if it doesn't then insert it but also need to ensure I don't go over 100 rows for that category.

I want to tried and avoid lots of queries in loops etc. How might I go about achieving the above in the most efficient way possible?

View Replies !   View Related
SELECT ... WHERE Dealing With Subquery Array
query where i get from a table named 'other_info', an array with all the user id's resulting from a subquery.

Expand|Select|Wrap|Line Numbers

View Replies !   View Related
Dealing With Null Values In An Expression
I am trying to return age in Days as follows:

select frmCode, (ageYears*365+ageMonths*30+ageWeeks*7+ageDays) as AgeInDays from sdata;

i realised that if one of those columns has a null value, the whole expression evaluates to null.

IS there a way to get around while creating a view, or do i need to write a StoredProcedure and have a logic to ignore the null values.

View Replies !   View Related
Storing As Datetime And Dealing With Timezones
We are storing dates in MySQL as type datetime instead of unix timestamps which some people do.

We have a user table we are storing the offset of a users timezone in (-1, -6, etc).

What do we need to do to ensure all time is uniform in relation to their offset taking into considering this software will be deployed on many different hosts/servers?

I assume we need to set the DB connections timezone?
SET time_zone = timezone;

Should this be set to 0? So we always have an offset of 0?

Then when retrieving the data we can use the CONVERT_TZ() functon to convert it to the users offset?

Would this be better handled by PHP?



View Replies !   View Related
Languages
im making a multilingual site, where should i best put all the texts for different language?
a row with a article id and a language id for every piece of text, or just 1 row with a column for every language?

View Replies !   View Related
Possible Languages
I plan to save text in one column of my table. This text can be in all possible languages from English to Chinese, Greek, Hebrew, Bosnian, Croatian, Russian...
What encoding should I use for this column. Or is this called "Collation"?
What is collation? How should I use my column to cover all the languages?

View Replies !   View Related
Localization Languages
Does any one had done mysql installation in local language. Does mysql supports installation wizard (steps & messages) in local languages.

As like PostgreSQL which allows to select local language at the start of setup and then proceeds with setup wizard in selected language. I want mysql GUI to be in local language, if any one had used it, let me know.

View Replies !   View Related
Multiple Languages
I am developing a website and I have developed it in order to support different file languages
I'd like to do the same with the database and I have chosen utf8_unicode_ci as collation but I'm not sure if this is important or I need to focus on something else
I'd like to be able to store usernames that include particular chars as ä, å, ø and others.

View Replies !   View Related
Database In Other Languages Except English
I am working on a cross language information retrieval system for hindi , tamil and english. For this i need to create a dtabase in all the above languages . How do i do that with MySql?

View Replies !   View Related
Different Languages In Table Records
I wanted to add different language support for my application and for that i needed to add text in languages like Arabic and Hindi into the records in a table in my Mysql Database.

I tried simple copy paste in MySQL administrator but it did not recognize the characters..
how do i enable support for the language's character sets?

View Replies !   View Related
Searching Database With Languages
i have the following situation: table with about 20 columns and two of them are tolanguages and fromlanguages. User uses search form which is basically two fields(to from) and a button.

What i am trying to do is to make a search by this two columns. I need that keywords from to field be searched in column tolanguages and from field in fromlanguages.

I tried full text search but i don't think it should be used in this situation because it doesn't search specific keywords in specific column. I also have an idea of using regexp but don't know yet how;

Example searches would be:
1. To: English; From: Chinese
2. To: Chinese, English; From: Russian

PS my problem lies in multiple keywords like in ex. 2

View Replies !   View Related
DB Design To Support Multiple Languages
I have a proposed application which should support two languages:
Spanish and US English. The data will be stored in MySQL database. We
will be having a single database. Can you please suggest about
possible configurations needed to be done at the database side to
accomplish this?

View Replies !   View Related
Multiple Languages Tables , How Should I Organize Them
Multiple languages terms tables , how should i organize them?

So i must build an application for a restaurant, where they can add new terms (like "spaghetti in bolognese style") in multiple languages 5-6-7 , where they can build the daily menu by selecting the plates, when they are ready with the selection of the plates, the menu with 7-10 plates must be automaticly ready in other languages too. so i have the category "meats" for example and the plate "duck breast" how do i organize that? "duck breast" translation must be available in 5-6 or more languages.

I must be able also to add later other languages too. I have some ideea but i think i'm wrong.

View Replies !   View Related
Choosing Collation To Support More Languages
utf8_general_ci and utf8_unicode_ci which on support more languages ?

View Replies !   View Related
Table Structure For Storing Information In Different Languages
I will develope an application that have data dictionaries translated to some languages.

Example of a non-localized table "Thing": thing_id, code, hidden, shortname, longname
Target: shortname and longname must be represented in many languages

My variants of the solution:

Model variant 1 (one table with many columns):
"Thing" table: thing_id, code, hidden, shortname_en, longname_en, shortname_de, longname_de, shortname_ru, longname_ru

Model variant 2 (two tables with default language in the parent table):
"Thing" table in english: thing_id, code, hidden, shortname, longname
"Thing_Loca" tabl: thing_id, locale, shortname, longname

Model variant 3 (two tables with language data in the child table):
"Thing" table: thing_id, code, hidden
"Thing_Loca" tabl: thing_id, locale, shortname, longname

My questions:
1) Do you know about any other models?
2) Which model would you prefer?
3) Do you konw any internet resources about this problem?

View Replies !   View Related
Store And Display Data Of Asian Languages
I properly store data in a table and retrieve that data properly from the table.

The data to be inserted in database table can be in English, Chinese, Spanish, Arabic, Hindi, Japanese etc.

The DB table would contain only one field/column to store that data.

Is there any solution regarding above scenario.

View Replies !   View Related
Multiple Languages, Multiple Products
I posted before and was helped immensely. I am designing a multilingual-capable site where each product may (or may not!) have a description in the user's chosen language. In this case, I want to get the default language description.

Say my product descriptions table has fields prod_id, language, and description.

When I have a single product and I want its description, I can retrieve it as follows:

View Replies !   View Related
A Foreign Key
In mysql, does foreign key work this way : instead of deleting the child entries when the parent entry is deleted, delete the parent entry when ALL child entries refering to it are deleted ?

View Replies !   View Related
Only One Of Each Foreign Key
i have a table that sort of looks like this

Code:

table.players
----
p_id (int) (primary key) (auto_incremenet)
teamID (int)
playername (varchar)

I want to run a query on this table so that it only pulls one player from each teamID.

how would I construct this query? It doesn't seem to be a very common thing to do

View Replies !   View Related
Foreign Key
i want to link PRIMARY KEY in one table as a FOREIGN KEY in an other. I have applied "InnoDB" to both, and applying the relationship via phpmyAdmin. When i try to enter data into the data base via some php. The Data doesn't seem to be arrive. Even thought the PHP returns say that it has been sent. If I take out the foreign key relationship, the data is sent to the tables.

View Replies !   View Related
Foreign Key In SQL
adding this:

FOREIGN KEY (Orte_ld) REFERENCES Orte(Orte_ld),

I get:

#1072 - Key column 'Orte_ld' doesn't exist in table

But shure it does exist in Orte. What shall I do?

View Replies !   View Related
HOW TO ADD FOREIGN KEY
I HAVE BEEN ASKED TO ADD A FOREIGN KEY TO THESE TABLES.

PubId is the foreign key but what is the correct syntax for mysql5 to add it

CREATE TABLE BookTitle
BtId VARCHAR(5) NOT NULL,
BtName VARCHAR(30),
PubId VARCHAR(5),
Value DECIMAL(4, 2),
PRIMARY KEY (BtId));

CREATE TABLE Publisher (
PubId VARCHAR(5) NOT NULL ,
PubName VARCHAR(20),
PubAddress VARCHAR(20),
PRIMARY KEY (PubId));

View Replies !   View Related
Foreign Key
What problems would be there if I don't use foreign keys in stars_in_movies table when I select data? I feel it doesn't really matter. Anyone would guess future problems if I get rid of foreign keys from the stars_in_movies table?

movies
id:integer (primary key)
title:varchar(100)
year:integer
director:varchar(100)
banner_url:varchar(200)
trailer_url:varchar(200)

stars
id:integer (primary key)
first_name:varchar(50)
last_name:varchar(50)
dob:date
photo_url:varchar(200)

stars_in_movies
star_id:integer, foriegn key referencing stars.id
movie_id:integer, foreign key referencing movies.id

View Replies !   View Related
Add A Foreign Key
The SQL statements below works fine if the line for the foreign key is omitted.
With the line included, I get this error message:

#1005 - Can't create table './marywhar_VegDb/test_fk.frm' (errno: 150)

I've also tried removing the constraint name and ON UPDATE and ON DELETE parameters - no difference.

Would someone please tell me what I'm doing wrong?


CREATE TABLE `levels` (
`id` tinyint(4) NOT NULL auto_increment,
`level` char(16) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=InnoDB AUTO_INCREMENT=5;


INSERT INTO `levels` VALUES (1, 'not specified');
INSERT INTO `levels` VALUES (2, 'low');
INSERT INTO `levels` VALUES (3, 'medium');
INSERT INTO `levels` VALUES (4, 'high');

CREATE TABLE `test_fk` (
`id` smallint(6) NOT NULL auto_increment,
`level` tinyint(4) default 1,
PRIMARY KEY (`id`),
CONSTRAINT `k_level` FOREIGN KEY (`level`) REFERENCES `levels`(`id`) ON UPDATE CASCADE ON DELETE RESTRICT
) TYPE=InnoDB AUTO_INCREMENT=1;

View Replies !   View Related
How To Add A Foreign Key
I think I've finally figured out how to make a foeign key - you just copy some code into the "SQL query" box near the bottom of a table's Structure view page, right?

I thought I also had the right code to paste in, but it isn't working. Here are the stats:

View Replies !   View Related
Why Use A Foreign Key?
I am going to have a database that will have around 7 tables. Each table will have a UserID column that will be used as the Foreign Key (kind of). I will setup a primary key comprised of the UserID and an Auto Incremented field in each of the tables, and I plan on setting up indexing on the UserID field, all tables but 1 table can and will have duplicates of the UserID, it is how I am implemented my single to many infrastructure. I will be updating and inserting into all the tables at the same time. Some of my queries however may or may not use more than 1 table.

Anyways my question is should I specifically setup a Foreign Key? As I stated above I plan on using the UserID field in each table as a Foreign Key....rather a linking identifier, but should I actualy create a Foreign Key?

View Replies !   View Related
I Want To Add FOREIGN KEY How?
What is the right command to add a FOREIGN KEY to a field in a table?

View Replies !   View Related
Create A Foreign Key
why I should explicitly create a foreign key,
especially if i'm not concerned with Cascading/Deleting when a row is
changed.

For example, let's say I have a USERS table, with the column 'USERID' as a
primary key. Other columns would be 'NAME' and 'EMAIL'.

In my users table I have two rows: ["1","Joshua","test@example.com"] and
["2","Mark","mark@example.com"].

Now, let's say I have a table that records a user's favorite film
(FAVEFILMS). Columns would be "FAVEID" (auto-increment key), "USERID"
(indexed because we will be looking up by userID) and "FILM".

In this favefilms table, let's put two rows: ["1","2","Jaws"] and
["2","1","Romancing the Stone"].

Obviously there is a relationship between the USERID in the users table and
the USERID in the favefilms table, but what is the purpose of explicitly
defining the USERID in the favefilms table as a foreign key?

If I'm writing a select statement to find Joshua's favorite film, I would
just say "SELECT FILM FROM FAVEFILMS WHERE USERID='1'".

If I've indexed the UserID column as a regular index (as should be done
with any column that will be used in a WHERE clause), does defining it as a
foreign key add anything useful? or does NOT defining it as a foreign key
create any harm?

Just wondering... I mean, hey I have no problem specifying foreign keys, I
was just wondering what the purpose was if I was not interested in
CASCADING or DELETING when changes happen to a table.

View Replies !   View Related
Foreign Fields
I have created a database with about 17 tables. I have been creating foreign
keys some of which have worked but when creating others I get the message
below

*************************
1005 (ER_CANT_CREATE_TABLE)

Cannot create table. If the error message refers to errno 150, table
creation failed because a foreign key constraint was not correctly formed.

***************************

I have checked to see If there are any obvious differences between the
tables that allowed the foreign keys to create and those that wouldnt. But I
could not find any differences

View Replies !   View Related
Dropping Foreign Key
What is the symbol to do for in "ALTER TABLE ... ADD CONSTRAINT symbol
FOREIGN KEY ..."?

In the manual, they say that "SHOW CREATE TABLE" gives the internal id
of the foreign key. Trying to do so, i see that it's not true.
How can I do to drop some foreign keys excepted the "DROP TABLE/CREATE
TABLE" solution because my tables have a lot of records.

View Replies !   View Related
Foreign Key Constraints
We are trying to load a set of data using Hibernate (O/R mapping tool). Hibernate creates foreign key constraints when it is creating our DB (mysql 4.0.14). The process for loading data requires us to break these constraints at certain points, however they will all be satisfied at the end of the transaction. Code: .....

View Replies !   View Related
4.0.15 Foreign Key Creation Bug?
The table creation script(at the end of this post) works fine on
4.0.1-alpha-win, but the foreign key constraints fail on 4.0.15-win. I
am starting the server with the same command for both versions:

mysqld-max-nt --console --transaction-isolation=SERIALIZABLE

In 4.0.15-win I can extract the following error after I run the table
creation script:

[test01] ERROR 1005: Can't create table '.ibdata#sql-a14_3.frm'
(errno: 150)

Also, the InnoDB status in 4.0.150-win shows:
------------------------
LATEST FOREIGN KEY ERROR
------------------------
030930 19:38:49 Error in foreign key constraint of table
ibdata/#sql-a14_3:
Cannot find an index in the referenced table where the
referenced columns appear as the first columns, or column types
in the table and the referenced table do not match for constraint:
FOREIGN KEY (contactInfo_fk) REFERENCES contact(pk) ON DELETE SET NULL
See http://www.innodb.com/ibman.html for correct foreign key
definition.

But the above is wrong. I DO have an index defined on the foreign key,
it IS the first column in the index, and their IS NO type mismatch.
Since this works on 4.0.1, I have to think this is a bug. I need a
working version of the server that supports transaction savepoints.
Any help appreciated!!

# Connection: test01
# Host: localhost
# Saved: 2003-09-29 18:16:42
#
CREATE TABLE orderjoin (
owner BIGINT,owned BIGINT
) TYPE=InnoDB;
CREATE TABLE orders (
pk BIGINT UNSIGNED AUTO_INCREMENT NOT N.....................................

View Replies !   View Related
Foreign Key And Primary Key
I'd like to create a table with PRIMARY KEY k (a,b,c) where a, b, c are foreign key. Is it possible? How can I do?

View Replies !   View Related
Foreign Key And MySql DB
I have done work in Oracle before and written allot of SQL code in my access DBs. I'm working on converting the tables from one of my Access DBs over to MySQL. I've got the tables all built they are all TYPE=InnoDB so that i can use foreign keys but my issue is this.
In access I would do lookups to queries that would restrict the data from the master table so that the child would only see what I wanted it to. I was hoping to use a view for the FK to restrict my data in MySQL just as I had done in Access with queries.

View Replies !   View Related
Creating A Foreign Key
So, far I'm using phpmyadmin to create my table structure and relations. My database storage engine is myISAM. There's options to create primary keys, index, and unique for the column fields, but how would I create a foreign key in phpmyadmin references a parent table?

View Replies !   View Related
FULLTEXT And Foreign Key
I found out that InnoDB doesn't support FULLTEXT Indexes after I designed a table. I'm going to attempt to re-design the table for MyISAM usage for the time being, but here is where my question arises.

Can a Foreign Key in an InnoDB table point to a MyISAM field? And if so, will the ON DELETE/UPDATE criteria function?
If not, I'll keep my table the way it is and find an alternative to FULLTEXT searching for now.

Edit: Found an answer to my question and it's no. FULLTEXT is a planned feature in InnoDB (1) and Foreign Keys in MyISAM are also a planned feature (2). If anyone knows a performing workaround, let me know.

View Replies !   View Related
Foreign Characters
I exported a table from access that had some foreign characters like russian for example. In the mysql db on an apache server (remote isp) the characters show up as question marks. Is there anything I can do to get the charcaters to display correctly in the database?

View Replies !   View Related
Dual Foreign Key
How would one implement a dual foreign key, kind of like an "and".
for example

table a( field01, field02)

table b(field01, field02

foreign key "field01 AND field 02"

)

View Replies !   View Related
Big Foreign Key Error
ERROR 1005: Can't create table '.projectproject.frm' (errno: 150)
what does this error mean?
This is the table I tried creating

mysql> create table Project(ProjTitle varchar(150),ProjId varchar(20),ProjectMar
k varchar(20),ProposalSubmitted varchar(40),TechDocSubmitted varchar(40),ManualS
ubmitted varchar(40),ProjectApproved varchar(40),ProjSubject varchar(150),SupId
varchar(20), foreign key(SupId) references Supervisor(SupId),primary key(ProjId))type
=innodb;

and this is the supervisor table I was trying to get foreign key from

---+
supervisor | CREATE TABLE `supervisor` (
`SupName` varchar(100) default NULL,
`SupId` varchar(20) NOT NULL default '',
PRIMARY KEY (`SupId`)
TYPE=InnoDB |
------------+-------------------------------

View Replies !   View Related
Mysql Foreign Key
i was told that you can use the foreign key inside a table in the database to get the mysql tables/feilds communicating with one another.
Could someone point me in the direction of a tutorial, or if someone could help me out it would be much appreciated, as i can't seem to find any information about getting tables to communicate with each other.

View Replies !   View Related
Two Columns In A Foreign Key
I have another question on Foreign Keys.I hame a table called 'Club' and i need to have the name of the manager as one of the columns in this table, but the thing is in the Managers table i have a column called 'Firstname' and another called 'Surname' (also another column called ManagerNo)what i need to happen is the name "John Doe" or "Joe Bloggs" or "John Smith".

View Replies !   View Related
Foreign Keys In SQL
I would like to know starting from which version of MySQL are Foreign Keys supported. Furthermore, I would like to know starting from which version of MySQL they work without any errors. And, at last, if you know a free webhosting provider which offers that version of MySQL.

View Replies !   View Related
Foreign Key Features For 4.1.8
Why does MySQL 4.1.8 does not show "ON DELETE RESTRICT" when i used the command "SHOW CREATE TABLE mytablename" command? Is this a default behaviour of Innodb in 4.1.8 where we don't need to set on delete restrict anymore? Code:

View Replies !   View Related

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