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.





Non Alphanumeric Chars Appearing As ?


I have a site which pulls content from a mysql database. Any non-alphanumeric character is displayed as a question mark. I noticed in phpmyadmin the collation was latin1_swedish_ci and thought this may be something to do with it.

Can anyone confirm this for me? If this is the case, what should the collation be and how do I change it?




View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Result Not Appearing
I run the Select query and I see the rows show up for a split second and then disappear. I have no clue how to actually view and edit the records

View Replies !   View Related
How To Query For Words Appearing In ONLY One Doc
I have a table like

Code:

tlb

ClassID Class Word Freq
1 Sports basketball 3
1 Sports Football 2
1 Sports Volleyball 3

2 Education Basketball 2
2 Education Music 1

3 Art Picture 3
3 Art Football 3

I would like to find words which are unique for classes(i.e., words which appear only in one class), e.g.

Code:

Sports Volleyball
Education Music
Art Picture

I figure out the following query statement

Code:

SELECT ID, Class, Word FROM tlb GROUP BY Word HAVING COUNT(Class) = 1;

View Replies !   View Related
<br /> Tags Appearing In Textbox?
building a CMS system and ran into a small problem. When I call back the text into a multiline textbox I get <br />'s appearing. Everytime I hit submit it adds a <br />.

Code:
echo '<td align="left" valign="middle"><textarea name="sub" cols="51" rows="3">';
$result = mysql_query("SELECT * FROM image WHERE ID = '1'");

while($row1 = mysql_fetch_assoc($result)){
echo nl2br($row1['sub']);
}
echo '</textarea></td>';
Is there anyway to omit the <br />'s but keep the actual line breaks in there?

View Replies !   View Related
Determining The Most Appearing Thing In A Column
I have a statistics table, and it has a column called page. I want to find out what page is visited the most. Every time someone goes to any page it adds a row into the table with whatever page they are on. What query could i use to find the most visited page?

View Replies !   View Related
Select Count Of Data Appearing In One Table From Another Table
I have three tables:

t_Products (id, name)
t_Shop (id, location, name)
t_Carries (product, shop)

If Shop carries a product, there will be a value pair in t_Carries but otherwise no record is listed.

Is it therefore possible to return a list in MySQL showing something like this

shop.Id, product.Id, count(or something)
1 1 0
1 2 1
1 3 1
1 4 0

Or must I use two query and programmatically generate the list?

View Replies !   View Related
Alphanumeric Records
I have a varchar field in a table of about 48000 records. The vast majority
of the values are strictly numeric, but some have a letter A-Z either
prepended or appended to them. I need a query to grab all records that are
numeric. I know I can:

SELECT *
FROM my_table
WHERE
col1 NOT LIKE '%A%' AND
col1 NOT LIKE '%B%' AND
....
col1 NOT LIKE '%z%';

There has to be a cleaner/easier way?

View Replies !   View Related
Alphanumeric Autoincrement No
my travel site db design ,

client asking auto increment alphanumeric no

example ( ab100,ac100) somthing like this manner )

2. client having Around 40 location , so they book any where ,

some time through online , some time direct center for book

tickets ,

What db engine i use for this ,

because the db must support concurrency transaction ,

View Replies !   View Related
Alphanumeric Sorting
I need to sort a column that may contain any combination of letters, spaces, or numbers ... including all letters or all numbers, but will never be empty.

"ORDER BY code" doesn't cut it for numbers because "10" would be listed before "2".

"ORDER BY (code+0)" works for most options unless the "code" is all letters or contains something like "1A" and "1B" where "1B" would come before "1A".

View Replies !   View Related
Non-AlphaNumeric Search
I'm doing a search for hospital names. Someone may be searching for "St Marys Hospital" but it is in the database as "St. Mary's Hospital". How can I search and tell mysql to ignore non-alphanumeric characters?

SELECT * FROM hospitals WHERE hospitalName LIKE "St Marys Hospital"

This should pull up the row where the entry is actually "St. Mary's Hospital"

View Replies !   View Related
Max() Alphanumeric Values
i have a table(entry) with fields like id, item,etc,..

Here item will have entries like ab-1,ab-2,ab-3,ab-11,ab-123,ab-1234,etc., where the appended number gets increasing.

I just want to select a record that has maximum value , ab-1234 in the above case.

I tried like this.

select max(item) from entry where item like 'ab-%'

and
select max(item) from entry where item like 'ab-____'

But If i have ab-1, ab-2 and ab-8, and use like 'ab-__' I got null as the result.

if i use like 'ab-_' then i get ab-8 as the result.

if i have ab-1 , ab-2, ab-8,ab-11 and use like'ab-_' i get only ab-8 when ab-11 is correct.

that is i may not know what will be size of the number after 'ab-'. I want at any point the maximum value.

View Replies !   View Related
ORDER BY Alphanumeric
In my table data has following order.

E1
E10
E12
E13
E2
E3
IG1
IG10
IG11
IG2
IG3

But I want to get alphanumeric order

View Replies !   View Related
Alphanumeric ORDER
I have a field with alphanumeric values es:

21
1502
250
250A
250B
...

If I order them mysql give me this asc order:

1502
21
250
250A
250B

Just because 1502 starts with "1" and 21 starts with "2"... It's right!
But how can i solve this problem?

View Replies !   View Related
Ignoring Non-alphanumeric Characters
Is there any way to do string comparisons.
and ignore all non-alphanumeric characters? For instance, check "foobar" and
have it match an existing record of "f$#!oo B(a)*R".

View Replies !   View Related
Ignoring Non-alphanumeric Characters...
Is there any way to do string comparisons and ignore all non-alphanumeric characters? For instance, check "foobar" and have it match an existing record of "f$#!oo B(a)*R".

View Replies !   View Related
Sort Alphanumeric Data
I need to sort a column of alphanumeric data from the DB in ascending order.

View Replies !   View Related
Sorting Alphanumeric Fields
I have many alphanumeric fields in my database that I would like to sort. The only problem is that if I have a number 2 lets say in my record, it will come after a record with number 11 in it or even number 100. Is there a way to sort this field numericaly? This field is used for serial numbers containing letters, that's why I can't simply convert it to a number field.

View Replies !   View Related
Replace Of All Non-alphanumeric Characters
Is there a function or something else to replace all non-alphanumeric characters with "_" (underscore)?

Example:
Hello World -> Hello_World
Do you like it? -> Do_you_like_it_

Or is it easier to create a table with two Columns (EntryId, ReplacedTitle) and store there the replaced titles with the EntryId?

ENTRY_TABLE
---------------------
Entry: 1
Title: Hello World

REPLACED_ENTRY_TABLE
---------------------
EntryId: 1
ReplacedTitle: Hello_World

View Replies !   View Related
Order By First Alphanumeric Character
I'm creating a list of stories, which I ORDER BY 'title' in the MySQL query. However, some of the stories have titles that begin with non-alphanumeric characters, e.g.:

'Tis the Season
...Lorem Ipsum Dolor

They end up at the top of the alphabetical list and when creating the alphabetical story title directory in PHP, they get assigned to the "letter" of single-quote (') or a single period (.). I would like them to be alphabetized under 'T' or 'L'.

Is there a way to get the ORDER BY to ignore quotes, series of periods, and other non-alphanumeric characters in the titles?

View Replies !   View Related
ORDER BY Alphanumeric, Numeric
How can i get the following order?

ab
a1
bc
bx
b4
zaq
z5
1ax
9b

Field type is varchar(50) latin1_general_ci

View Replies !   View Related
Ignore Non-alphanumeric Characters
I'm creating a PHP search engine for my website. I've stripped the non-alphanumeric characters out of the query. Next stage is to search the MySQL tables, but to ignore the non-alphanumeric characters in the tables.

For example...
- $search = "example"
- I want it to return true if it finds "example" or "£e(x)am_pl!e"

View Replies !   View Related
Custom Alphanumeric AutoIncrement
I am aware of how to create an auto-increment field but I was wondering if it is possible to create a custom auto increment id using both Alpha and Numeric (ex. A001423)?
If so, can you have the Alpha character roll-over sequentially (A999999 to B000000)?

View Replies !   View Related
Replace Alphanumeric To Numeric
I have some alphanumeric values in a column and now i have to replace all those alphanumeric values to numeric one.. How it is possible by a single query.

Is it possible by using regex or replace function().. Let me know in detailed.

View Replies !   View Related
Hex Instead Of Chars
I need to write a little Windows utility in C++ to retrieve data from a
mysql database that belongs to a Linux backup program called Bacula. The
data I am getting consists of hex values where I would have expected a
character string e.g. instead of Abcd I get 41626364. Something to do with
Unicode I expect but I can't find out how to deal with it.

View Replies !   View Related
Chars
How to define chars wich starts and ends string in table column. I have column varchar(10) and I try to search table with regexp but I dont have result because I dont know how to define char wich is before and after string. Everything works with like %variable% but i want to searching be more efective.

View Replies !   View Related
1 - 2 Chars
Our fulltext index is setup to handle 3 char min_length. However, our visitors need to be able to search for certain 1-2 char phrases. In somewhere like Google I could type the phrase in quotes and get results but even with boolean syntax enabled in MySQL I still get invalid or no results for the likes of "u are u" or "PS 2".
Is there a workaround aside from massively bloating our fulltext index by lowering the min_length further?

View Replies !   View Related
Select Not Returning Alphanumeric Values
PHP version 5.2.6
MySQL version 5.0.51a-community

I am atmysqlting a simple query to return information about a manufacturer part when the part number is entered. When the part number is numeric, the query returns the proper information. When the part number is alphanumeric, no information is returned.

The field being queried (MfgPart2) is a char(50) field.....

View Replies !   View Related
Chinese Chars OK
I have mysql 5 and php 5.1.2 with chinese chars in utf8 on mysql.
Browsing the tables in phpmyadmin shows correct chinese characters.
However, a custom php page to display them shows only ???

At the top of my php page I did include:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

View Replies !   View Related
8 Bits Chars
i am reciving an 8bit string which until today i inserted it into the mysql with smal problem of the letter mixing.
now i have a jar which helps me to fix the mixing problem!
for that i open a frame and use a font that i have recived in a jar :

jf = new JFrame(); label2 = new JLabel("000"); label2.setSize(30, 300); label2.setFont(Font.decode("Web Hebrew AD")); jf.getContentPane().add(label2); jf.pack(); jf.setVisible(true);

his do correct the mixing problem but when i try to insert it into the mysql i get only ?

View Replies !   View Related
Accented Chars
I am trying to insert accented characters, from mysql command line as in:

INSERT INTO category (title) values('t¨¨st');

then

SELECT title FROM category;
+-----------------+
| title |
+-----------------+
| t?st |
+-----------------+

I get a question mark rather then the accented e (¨¨).

However if i try to enter japanese all goes well as in:....

View Replies !   View Related
Cpecial Chars
My php form write data using addsleshes to Mysql database (if someone write ' or " in database stays ' or ").
And now problem:
How can I use special chars (" or ') in ,,like,, query?
In command prompt I'm accessing to Mysql server and when I do select * I can see, for example, that word Rock' is supstitude with Rock' and that is OK. But I can't define like query with quotation mark (') which result with Rock' :
select * from table where name like '%ock'%' - return quotation error
select * from tabela where naziv like '%ock'%' - nreturn Empty set

View Replies !   View Related
SELECT Only First 20 Chars
If this is a really simple question I apologise. I'm almost certain there is a way to do this, I just can't find it out.I want to SELECT the first 20 characters in a column using a SELECT query. eg. if the column contains a really long text entry then all I want is the first 20 characters to be returned by the query. If less than 20, obviously I want it aswell.

View Replies !   View Related
String With 6 Chars
i have colums with FULLTEXT keys, and performing search by selecting from table with MATCH AGAINST. Now, my ft_min_word_length is set to 4 (and my provider "can't" change it). I understand i can't search for words with length less than 4, but why doesn't mysql server consider "AB-123" as word with 6 chars.
I have entries in my table like, "AB-123", and let's say "AB-1234".
if I search for "AB-123" it returns nothing, if i search for "ab-1243" it select right row

View Replies !   View Related
Longer Than 255 Chars
I am here trying to learn MySQL and I have a freewebhost so I'm here just running a bunch of queries through its PHPmyAdmin, still learning..
I am wondering.. How do databases like this forum store values into columns (i suppose?) that are longer than 255 characters? or am I missing something here, I probably am.. can someone shed some light?
edit:Oh Nevermind. Just found out about 'text' online somewhere else.. yeah i thought something like that existed.. read a while back.. Hey does anyone know of any good up-to-date MySQL resource pages?

View Replies !   View Related
What Holds More Than 255 Chars?
right now I have a column on my data-base that is VARCHAR and holds a max of 255 characters. I need to hold more than that, but im not sure what kind of field it needs to be?

also if I change the the field type from VARCHAR to whatever it needs to be...will it mess up all the data I already have in that field?

View Replies !   View Related
Alphanumeric String Evaluates To 0 In SELECT Query
I have a table with the following structure and data:

Table T1:

n: INT
n_squared: INT,

n n_squared
0 0
1 1
2 4
3 9
4 16
...

Query:

SELECT * FROM T1 WHERE n_squared='ABC123'

Result:

n n_squared
0 0

How can I avoid the default typecasting?

View Replies !   View Related
Special Chars After Upgrade
after upgrading my MySQL-DB from version 3.23 to 4.1.1 on a Linux machine, I can't type section symbols(§) in the MySQL monitor any more.

View Replies !   View Related
Include Any Chars From [0-9] In Like Query
Im trying to write a like query:

select * from table1 where column1 like 'abc[0-9]%'
(I realize this syntax isnt correct)

I want to include any chars from 0-9 in that spot... Does anyone know how to do this?

View Replies !   View Related
Count Chars In Field
I need to know how to select from a field where the total number of chars in the field is less than 5.

View Replies !   View Related
Chars In Mysql Query
If a user search for a word like 'caño' he gets results containing both 'caño' and 'cano'.
I don't want to extend searches in words with 'n' instead of 'ñ'.
But I also want to keep such extension when a user is looking for a word with an ' á ' , results contain both ' a ' and ' á '

View Replies !   View Related
Store More Chars In A Field
Is there a way to store say 2000 charecters in a field? I thought varchar is limited to 255, but I would like to store about 2000-3000. What field type would accomidate that, if any? Or do I need to write text files?

View Replies !   View Related
SELECTing WHEN Chars >= 4000
I have a table of articles, and each article has a "chars" field storing the number characters it has. There are two kinds of SELECTs I'm looking to do:

1: Select until @var >= 4000. So MySQL would select a row, increment the variable by 'chars', and then check to see if it's >= 4000 before continuing.

2: Select five rows that appear AFTER the first 4000 characters. So, five rows after whatever rows were selected in #1.

Is this sort of thing doable in a query, without the use of PHP? If not, then oh well. The problem is that I'm doing the first query by selecting 10 rows, then using PHP to go through and get 4000 characters, then discard the rest. Then, and here's the bugger, I cache the output. Later on the page, I show five "most recent" articles using a variable set in the now-cached output to tell the query at which row to start pulling (WHERE id <= $last_id). When the first bit's been cached, the script doesn't run and the variable isn't then. Then the next bit on the page just errors out because it has nothing to go on.

View Replies !   View Related
Is It Possible To Check For The First Chars In A Db - Column?
Trying to compare the first 4 chars with the first 4 chars in a db column ....

View Replies !   View Related
Problems With Special Chars
I had to move from my hosting and I needed to export my MySQL databases.
I did it via the phpmyadmin panel, imported via shell to the new host and everything ran smooth.
However, I found some problems when special characters: instead of á, it converted as %a, and so on.

I found out that all the special characters were "lost" in the migration proccess, but luckily all of them follow the same pattern: á became %a, é became %e... so it should be easy to do a massive replacement.
My question is: what kind of script/query do I have to do in order to fix these special characters on the fly? (I already thought about the possibility of exporting it again to a .sql file, replace it with a text editor and reimport it again, but the database is so big (1200mb), and usage is very high so I'd prefer to do this "on the fly" with a script and UPDATE queries, if possible)

View Replies !   View Related
Getting Records Based On Chars In A String
I have a table with 2 fields. Field 1 contains Names. Field 2 contains a single character A,B,C,D or E.

I have a string "BCE" for which I want all the names that contain one of those characters (B,C, or E). For Example:

Field1
======
Jo
Ron
Mary
Sue
Mark
Frank

Field 2
=======
E
D
A
C
D
B

Desired Result after Query:
===========================
Frank
Sue
Jo

SELECT * from TestTable Where Field2 = SomeFunction("BCE")

How can I do this using a SELECT statement?

View Replies !   View Related
Table Words With Special Chars
Using Perl v5.8.5 + MySQL v4.1.9 on Linux FC2.

I'm trying to parse a UTF-8 document (<?xml version="1.0" encoding="UTF-8"?>),
and store it into a MySQL database (Collation: utf8_bin).

The document contains special characters ('música española' for instance), and
after storing it into de DB, I get this word: "música española"

How can I store words with special characters

View Replies !   View Related
Windows-1254 Non-latin Chars Are Replaced
MySQL 3.23.48
I am entering windows-1254 encoded non-latin chars such as ç, ü, ö into a MySQL 3.23.48 db but they are appearing in the db/html code as &ccedil; for ç, &uuml; for ü and &ouml; for ö.

Every time I need to issue a find/replace command.
Since no encoding had naturally been defined in the beginning I do not know what is causing this problem.

View Replies !   View Related
DB Export/import - Problem With Special Chars
I exported a database scheme using PhpMyAdmin (MYSQL40 compatible SQL-file). That worked well. Windows Notepad displayed all the special characters (umlauts [German ones], trademark symbols and so on) correctly. Then I used PhpMyAdmin to import the scheme to a different server. The software imported the sql file without giving any error messages. But all the special characters in the new scheme are broken.

It replaced characters like ö (an o with 2 dots on it - HTML entity &ouml; [for users whose browser can't display it]) with ö (two strange chars). I can't find any character set settings in the SQL file. So I think that the server defaults were used. I loggedin at phpMyAdmin with iso-8859-1 as language. Does anybody know this problem? What do I do wrong?

View Replies !   View Related
Command Line Client Eating Up Chars
Hello, I'm using version 5.0.51 of MySQL on Windows XP. I'm having a bizarre problem regarding string values: After importing some values using a small PHP script an SQL sentence executed from the command line client such as this: .....

View Replies !   View Related
Unicode Case Insensitive Query (sjis Japanese Alphanumeric Character) ?
I want to do the case insensitive SELECT query for sjis unicode data.

when i tried, case insensitive query is ok for ascii data, but it is not ok for sjis full width alphanumeric characters.

View Replies !   View Related
How To Store Chinese Chars And Also Italian, French And English In Mysql ?
I'm not able to store chinese characters into a column in a table....

how should the db setted and the table created to be able to store
different chars like chinese, french, italian and english ?

View Replies !   View Related

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