What Collation Sequence?
I've just transferred a small PHP/MySQL application from a Firepages phpdev5 install to an XAMPP install, so I've got new versions of everything. I used phpMyAdmin to export and import the tables of the database. When recreating the database on my new install I selected the default collation (latin1_general_ci) but my application is now displaying ? in place of a number of characters so I guess I got it wrong. I can't see where in the old phpMyAdmin (2.3.0-rc3) to determine what collation the database uses.
View Complete Forum Thread with Replies
Related Forum Messages:
Disrupted Sequence
Another brainteaser: CREATE TABLE IF NOT EXISTS `test` ( `id` INT(11) unsigned NOT NULL auto_increment, `cid` VARCHAR(10) NOT NULL, `item` VARCHAR(10) NOT NULL, `val` INT(11) NOT NULL, `dt` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 In the above example table I need to find the first 5 highest values of val that break the sequential set of values. In other words: say I have values 49,48,45,44,43,40,39,37,36,34 of val in my table, with 49 being the highest value of val (need to sorted first, because values may randomly be dispersed in my table), then I want to get 47,46,42,41,38 as the query result.
View Replies !
Create A Sequence?
I am creating an application that will contain three tables that need to share the same sequence. Upon digging through the docs, I do not see how I could do this. Could someone give me some guidance into this? Also, As I read the docs, when I am creating tables, there is something about an InnoDB? Sorry to be confused, but I am not sure how to begin creating my database, nor tables without this knowledge.
View Replies !
Sequence Substitute
I have a problem about create sequence number which can be reset after MAXVALUE has been assigned. In the older version of mysql i can use "create sequence", but in the recent version i can't do that anymore. All i know in mysql ver 5 is "Auto_increment" which cannot be reset number without delete or truncate table.
View Replies !
CREATE SEQUENCE ?
Tracing some examples in a book from Apress, for some reason they go for Oracle in this book - not my cup of tea, especially not when I am sitting on a vista-terminal. Enough of my complaing. How do I create a sequence in mysql ? This is the example I am stuck with: CREATE SEQUENCE SEQ_ID_GEN INCREMENT BY 1 START WITH 100 MINVALUE 1 CACHE 50 ; How do I write that sentence in mysql ?
View Replies !
Sequence Generation
I was wondering if there was something close to CREATE SEQUENCE in MaxDB for standard MySQL. I'm thinking of just doing a table/stored procedure and calling it a day, but was wondering if MySQL had some other alternative.
View Replies !
Identity, Sequence, Serial
Does MySQL offer capability for any of the following? - IDENTITY - SEQUENCE - SERIAL Or is AUTO_INCREMENT the catch-all for the functionality of all of the above? I ask because I'm looking into Java EJB3 which describes support for any of the above (as well as AUTO_INCREMENT, so I'm not out of luck completely).
View Replies !
Re-arrange Primary Key Sequence
i am facing a problem with my application when someone deletes a record and hence its key disappears breaking the sequence e.g 1 - entry 2 - entry (3 - deleted no mere here) 4 - entry 5 - entry When key is not there my AJAX application fails to run properly due to not finding next id. Is there any method to re-arrange primary key values to a proper sequence when one or more numbers are missing?so that i will write a query and whenever user deletes an item i will re-arrange the primary key sequence automatically
View Replies !
Selcting Date Sequence
I am trying to return a set or rows that represent all of the days between two dates. For example, I want to select all the days between December 25th, 2005 and January 5th of 2006, and i am looking for it to return (shown here in CSV) 2005,12,25 2005,12,26 2005,12,27 2005,12,28 2005,12,29 2005,12,30 2005,12,31 2006,01,01 2006,01,02 2006,01,03 2006,01,04 2006,01,05 So, for any date, i want to select all the days in between. Any ideas?
View Replies !
Order By An (out Of Sequence) Set Of Numbers
I'm having a problem as follows: here is a an example table (tbl_test): id | value ---------------- 1 | hello 2 | hi 1 | bye 4 | cya where the value field is variable. and i want to select them so they are listed as follows: id | value ---------------- 2 | hi 1 | bye 1 | hello 4 | cya is it possible to order by and array - something like: SELECT * FROM tbl_test WHERE 1 ORDER BY id (2,1,4)
View Replies !
How To Create A Sequence In MySQL
I am not able to create a sequence in MYSQL 5.0 Want help on creating the same. Basically, what I am looking for is, that I should get a number greater that the last one on every call to this sequence. In Oracle, one can simply write something like:- CREATE SEQUENCE seq_ordermaster increment by 1 start with 1 maxvalue 999999minvalue 1 nocache Nocycle; And while calling, one can use it by selecting seq_ordermaster.nextval from DUAL Considering the fact that there is no DUAL table in MySQL, how can One write such a sequence and also, how one can get the next value on each select statement?
View Replies !
Mysql Execution Sequence
I need to retrieve the last value from a column in a mysql table, perform some actions on it, then add 1 to the original value and store a new entry. I am worried that if multiple users access the database at the same time I will end up with duplicated 'new values'. Does mysql complete execution of a script before it allows access to another user or do I need to 'lock' the table in some way while the script executes?
View Replies !
Find The Number Of A Row In A Sequence
MySQL Code: SELECT * FROM comments WHERE id=12345 ORDER BY rating Is there a way to determine the position that this rows appears in the sequence? Eg, so I can print out: "This site is rated position x out of y"
View Replies !
Bulk Insert Of New Records In Sequence
I am looking to create a querty that searches for the max value a field called listnum in a table called tbl_listing and then interests 25 new records with listnum's starting 1 higher then the max value. ie if the highest listnum is 1000 it should insert new records with a listnum of 1001-1024. All the other fields in the table can be blank. Is there a simple (or not so simple) query that I can run to do this?
View Replies !
How To Generate Sequence Values During Query
I have query like below: SELECT part_no,part_nm,qty FROM tb_stok_out ORDER BY part_no as result: part_no part_nm qty aaa asdfd 3 abab sdfsdf 4 abab adfdf 5 Is it possible in mysql to generate sequence number using query, so the result will be like below : 1 aaa asdfd 3 2 abab sdfsdf 4 3 abab adfdf 5 ... etc
View Replies !
Create Sequence Syntex Errors Out
I installed mysql 5 and trying to setup database. Somehow it can't create sequence. it throws generic 'check the manual that corresponds to your mysql server version......'. I have tried just about anything nothing works. Also tried to reinstall mysql few times--same thing. Also tried to go through mysql 5 manual nothing is in there for sequence. Or sequence is not supported with mysql version i have?
View Replies !
Inserting New Data Within A Structured Sequence
I'm trying to organize rows in a specific sequence. However, I also want the capability to insert new rows within that sequence and not simply append them to the end of the dataset as autosequencing would have you do. How is this accomplished?
View Replies !
Extract Data According To Preset Sequence... How?
wondering whether i can make this work... first, i will make an array like this: Quote: $category_id[]="10,6,9,8,3"; then i wanna extract the information( category name, category id, and sub category into array and arrange them in the preset sequence in category_id[] above. Quote: $query="select * from category order by $category_id[] "; $result="mysql_query($query) or die(mysql_error()); while ($row=mysql_fetch_assoc($result)) { echo $row['category_id']; echo $row['category_name']; echo $row['subcategory']; } the output i wish to get is like this: Quote: 1st result: category id: 10 category name= the name of category 10 sub category= sub 1 category 10 sub 2 category 10 sub 3 category 10 2nd result: category id: 6 category name= the name of category 6 sub category= sub 1 category 6 sub 2 category 6 sub 3 category 6 3rd result: category id: 9 category name= the name of category 9 sub category= sub 1 category 9 sub 2 category 9 sub 3 category 9 I'm confuse in the extraction info according to the preset sequence... can anyone please share some ideas? will this idea works?
View Replies !
Max Sequence Number In Claim Transaction Table
have a table that contains a transactional history showing how a claim amount has changed over time. Each time the claim amount is updated, a new claim sequence number is used. The fields I have are Claim Number(CLMKYT), Claim Sequence(CLMSQT), Claim Amount(£)(OUTSTT) and Date the claim was entered/updated (EFFDTT) I want to pull out the latest (most recent) claim amount for each claim as at any particular date. I have the below query which I think almost gets me there, but not quite! Code: .....
View Replies !
Generated Sequence # Based Upon Content Of Row Being Inserted
I have a table - CREATE TABLE `sample` ( `Id` smallint(6) NOT NULL auto_increment, `division` varchar(5) NOT NULL, `secion` varchar(5) NOT NULL, `div_sect_seq` smallint(6) NOT NULL default '1', PRIMARY KEY (`Id`) ); I'd like to write the insert statement that would generate the next div_sect_seq number based upon the value being inserted into the table. Let's say that the table contains: |--id--|-division-|-section-|-div_sect_seq-| | 1 | SC | XX | 000001 | | 2 | SC | YY | 000001 | | 3 | SC | XX | 000002 | I'd like to insert a row for divsion = 'SC' and section = 'XX' with the next div_sect_seq (which would be the max value of div_sec_seq + 1 on the sample table for the division and section) which should be the value of 000003.
View Replies !
Primary Key Field: Varchar(32) Versus Sequence
I got in the habit of coding primary key fields as varchar(32) that was generated by an md5() since it was a public site and I wanted to avoid people guessing record numbers (for other reasons). Is there a performance problem with doing that? If so, how do you tackle the same concern?
View Replies !
Ordering By Sequence Field With Empty Values
I have a sequence field in my db table that I'm using to order a list. I'm trying to ORDER BY this field, but it puts the empty values before 1 such as empty, empty, 1, 2, 3, 4 instead of 1, 2, 3, 4, empty, empty, empty How can I fix this?
View Replies !
Collation??
My webhost installed a new version of PhpMyAdmin a few months ago. When I try to create a field in a table I see a dropdown list named: Collation. What is this?
View Replies !
What Collation Is Best To Use?
What collation is best to use? My site is English and i believe i should be using utf8_general_ci but am not sure. Can someone advise me on the best collation to use. My database will be including html character codes.
View Replies !
Best Utf8 Collation
I'm not sure which utf8 collation to use for mysql server. It's probably going to be one of these 3 but I have no idea what the difference is. utf8_general_ci, utf8_unicode_ci, utf8_bin
View Replies !
Change Collation
We are using two systems, one has mysql4.0 and the other has mysql 5.0. One v5 table does not seem compatible with v4, because a field is created with collation 'latin1_swedish_ci'. When, in phpadmin(2.6.3-pl1), I try to remove the collation, it won't let me. Question: what collation type must I select, so mysql4 is able to use the tables?
View Replies !
Dataset Collation
I am using phpMyAdmin for a database and when creating a new table it ask me to specify the table's "collation". I am a bit baffled on this and if someone might shed some light I'd appreciate it. I realize this may not be the forum but hopefully someone can point me in the right direction. My site is a site that will only have English characters in it.
View Replies !
Collation Choice
For a table that keeps info that is part of a dynamicly generated web page on a site that is in English and is directed at USA audiences, what would be the normal choice for collation?
View Replies !
Set Default Collation
However I recently tried MySQL 4.1.x and noticed that there have been some changes. My questions are:- 1) The default collation setting is Latin1_swedish_ci. What do I need to change this to in order for my old tables to import correctly? Currently special chars like tm <- trademark import as ? <-Question Marks? 2) How do I set my own default? 3) Is there any way to export a new database back to an old version of MySQL eg 4.1.x -> 4.0.x?
View Replies !
Collation Issues
by default, my collation is set to latin1_swedish_ci, which I think is normal, but how do I switch that to normal English, or utf8 and keep that there as the default?
View Replies !
Collation Problem
I've just tried upgrading to 4.1, but have a problem with the new collation feature in 4.1. I first tried to convert my old 3.23 db to utf8 during the installation procedure, but all the text and varchar columns had their lengths drastically shortened e.g. from 255 to 85, which caused a fatal loss of data. Then I tried installing it using latin1, but all the tables ended up with a collation of latin1_swedish_ci instead of latin1_general_ci, which I would have thought would be the logical default. This still gives some problems when comparing my data and it will be a huge job to go through manually changing all columns to latin1_general_ci. So, does anyone know of a way to make MySQL upgrade my old databases using latin1_general_ci instead of the swedish version? Also, if anyone knows of a way to convert to utf8 without the enormous loss of data
View Replies !
Charsets/Collation
I have a database of words that includes many names that contain accents, including accents on almost any letter. For instance: Þórr Æðelþryð Štefan Željko What charset or collation should I be using? I'm using latin1_swedish_ci right now and it's giving me some problems, specifically at least with these characters, replacing them with question marks. It handles others fine. ş ě đ ł
View Replies !
Collation And Type
they are set on InnoDB and latin1_swedish_ci and I would to change to some different.How to change default collation and type?
View Replies !
Loosing Collation
I got a problem with mySQL/phpmyadmin: It seems as if every table I do in mySQL that got text-cells like TINYTEXT would be setup with a "collate" somehow e.g. latin_spanish_ci or something like that. Now no soundex() query I do on those tables does work, so I guess this could be because of that... how can I loose that collate-thingy? I mean I already tried setting up several tables by hand not using any "collate" but still the tables finally had collate within
View Replies !
Modify The Collation
I noticed that when creating tables using PhpMyAdmin I didn't set the collations and they are all set to "utf8_general_ci" where I need it to be utf8_bin. Is there a way I can alter all tables in the db. I'm thinking of something along the lines:Code: ALTER tables SET Collation = 'utf8_bin' The above probably doesn't make sense,
View Replies !
Collation Is Latin
I use perl and mysql. The Collation is Latin1. I often place UTF-8 characters into my database and get errors. I'm not sure if this is a perl or mysql issue. Does the collation Latin1 work with UTF-8 characters? I read the blog below where someone compained about the Latin1 http://fplanque.net/Blog/devblog/2004/12/03/another_lousy_php_mysql_charset_issue
View Replies !
MySQL Collation
In my phpmyadmin, it shows all the tables as: Collation: latin1_swedish_ci What exactly is this collation? And what should I set it if I am using plain english?
View Replies !
Character Set And Collation
I am new to MySQL and transferring a database from MSSQL 2000 to MySQL. When creating a view the character_set defaults to utf8. I want it to be latin1. If I specify latin1 for the field in the view it works ok. Like: SELECT _latin1 'Client Accounts' AS AccountName Is there a central place where I can change it permanently so I don’t have to specify it in every view? I have the following settings: SHOW VARIABLES LIKE 'char%'; 'character_set_client', 'utf8' 'character_set_connection', 'utf8' 'character_set_database', 'latin1' 'character_set_results', 'utf8' 'character_set_server', 'latin1' 'character_set_system', 'utf8' 'character_sets_dir', 'C:Program FilesMySQLMySQL Server 5.0sharecharsets' SHOW VARIABLES LIKE 'coll%'; 'collation_connection', 'utf8_general_ci' 'collation_database', 'latin1_swedish_ci' 'collation_server', 'latin1_swedish_ci' I think I need to change 'character_set_connection' to 'latin1'. How do I do this please?
View Replies !
MySQL Collation!
System Info: Linux localhost.localdomain 2.4.21-32.ELsmp #1 mysql Ver 14.7 Distrib 4.1.15, for pc-linux-gnu (i686) using readline 4.3 I am a newbie so please can someone help me!? I have a dedicated Linux server and I want to det the default collation and character set to utf8. From what I have read so far I have changed /etc/my.conf to: old-passwords default-character-set=utf8 This however has not helped. Do I need to recompile MySQL and if so how do I do it so that I can pass --default-character-set=utf8?
View Replies !
Collation Change
I have installed PHPBB forum on my mysql database and a problom appears when I try puting down some hebrew text. In PHPmyadmin it says that the Collation is set to UTF-8 Unicode (utf8) in all of the tables, and I believe that is the problom... I don't know how to change that to hebrew (hebrew_bin or somthing), and i'm sure it could work if i knew how
View Replies !
|