473,224 Members | 1,602 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,224 software developers and data experts.

SET failing

I have a simple database table "doctypes"

CREATE TABLE `xoops_viking_doctypes` (
`ID` int(11) NOT NULL auto_increment,
`menu_title` varchar(20) NOT NULL default '',
`name` varchar(40) NOT NULL default '',
`title` varchar(200) NOT NULL default '',
`description` text NOT NULL,
`categories` set('marketing','support') NOT NULL default 'marketing',
PRIMARY KEY (`ID`),
KEY `categories` (`categories`),
FULLTEXT KEY `description` (`description`)
) ENGINE=MyISAM DEFAULT CHARSET=ascii AUTO_INCREMENT=56 ;

this simple sql is simply crashing!

SELECT * FROM `xoops_viking_doctypes` WHERE FIND_IN_SET('marketing',
categories) > 0

What is wrong with that?

Mar 9 '06 #1
7 1278
"bingomanatee" <ed******@manateebay.com> wrote in message
news:11**********************@z34g2000cwc.googlegr oups.com...
this simple sql is simply crashing!

SELECT * FROM `xoops_viking_doctypes` WHERE FIND_IN_SET('marketing',
categories) > 0

What is wrong with that?


Are you serious that this is literally crashing? Or does it simply not
return the result you expect?
"Crashing" means that the MySQL client or server terminated abnormally. Is
this the case?

What version of MySQL are you using? (4.0, 4.1, 5.0)
What operating system are you using? (Windows, Linux, etc.)
What client interface are you using? (mysql CLI, PHP, Java, ODBC, etc.)

Regards,
Bill K.
Mar 9 '06 #2
sorry: more specifically the sql is not returning the result I expect
-- in fact it is not parsing properly!

MySQL 4.1,
Solaris,
PHP 5.0.5

( am testing the results in phpMyAdmin as well)

Mar 10 '06 #3
"bingomanatee" <ed******@manateebay.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
sorry: more specifically the sql is not returning the result I expect
-- in fact it is not parsing properly!

MySQL 4.1,
Solaris,
PHP 5.0.5


Okay, I have tried the same table and query in my test database. I see no
error, and it returns results that I would expect. But I am using MySQL
5.0.

Do you have an error message that displays when you try to execute the
query?

What do you get when you omit the condition, that is:
SELECT id, categories FROM `xoops_viking_doctypes`;

Regards,
Bill K.
Mar 10 '06 #4
yes; I didn't see it before because I am using a different server now.)

Illegal mix of collations (utf8_general_ci,COERCIBLE) and
(latin1_swedish_ci,IMPLICIT) for operation 'find_in_set'

Mar 10 '06 #5
"bingomanatee" <ed******@manateebay.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
yes; I didn't see it before because I am using a different server now.)

Illegal mix of collations (utf8_general_ci,COERCIBLE) and
(latin1_swedish_ci,IMPLICIT) for operation 'find_in_set'


So one character set was used when the schema was defined, and a different
character set is being used as you're doing your query. You need to use the
same, or a compatible, character set as that which is used in the schema
definition for the SET field.

Regards,
Bill K.
Mar 10 '06 #6
I don't get it; I am using a literal string that I embed in the sql to
compare to the set field value; the database collation is the same as
the filed definition (latin1_swedish_ci; not a conscious choice on my
part but if it ain't broke ... cept, I guess it is. )

WHy is it interepreting a raw string imbedded in a SQL query as udf8,
and how do I change it to latin1...?

Mar 10 '06 #7
"bingomanatee" <ed******@manateebay.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
WHy is it interepreting a raw string imbedded in a SQL query as udf8,
and how do I change it to latin1...?


I haven't worked very much with character sets. I think you can specify a
character set during your connection. You can also use the CONVERT function
to force a given string literal into a character set you specify.

These pages may help:
http://dev.mysql.com/doc/refman/5.0/...onnection.html
http://dev.mysql.com/doc/refman/5.0/...t-convert.html

Regards,
Bill K.
Mar 10 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Simon Stewart | last post by:
Has anyone else experience of imagecreatefromjpeg failing with an error message about memory even though the size of the image being uploaded is nothing like the space available to the script? ...
7
by: Chris Curvey | last post by:
I've looked at this so long that I must be looking right past it. This code: class Page: ########################################################## def write(self, value, row=None, col=None,...
0
by: Sundeep Gawande | last post by:
I am facing a strange problem. I am trying to host a .NET(C#) control in a VC6 COM ocx. Now when I create the control using CreateControl(...) or CoCreateInstance(...) my call is failing with...
7
by: Kieran Simkin | last post by:
Hi all, I'm having some trouble with a linked list function and was wondering if anyone could shed any light on it. Basically I have a singly-linked list which stores pid numbers of a process's...
3
by: bob | last post by:
Hello, I've tried a few testing frameworks with C# but so far haven't found a way to debug into a failing test. I'm used to S Unit (Smalltalk) where when a test fails you just right click on it...
1
by: Frank Rizzo | last post by:
Hello, I have a bunch of thread in my app doing variuos things. One of them is failing at some point in the app and I can't (actually don't know how) figure out which one it is. Is there a way to...
3
by: Michael Tissington | last post by:
I'm using LoadLibrary to import a DLL in a asp.net application. The dll was written in c++ and is located in the bin folder I have been testing the website on my development machine and our...
18
by: Scott David Daniels | last post by:
There has been a bit of discussion about a way of providing test cases in a test suite that _should_ work but don't. One of the rules has been the test suite should be runnable and silent at every...
0
by: a_rajanikanth | last post by:
Hi, The following is the trigger which is failing when executing. Can you please tell me the reason why it is failing ? Trigger got created but throwing exception. CREATE TRIGGER TOBJ_U...
3
by: noon | last post by:
I'm runing an xmlHttpRequest to get the site's source code and then applying the regex xhr.responseText.split(/<body*>((?:.|\n)*)<\/body>/i) Works for google.com. Fails on yahoo.com and...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.