473,910 Members | 4,173 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SET failing

I have a simple database table "doctypes"

CREATE TABLE `xoops_viking_d octypes` (
`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_d octypes` WHERE FIND_IN_SET('ma rketing',
categories) > 0

What is wrong with that?

Mar 9 '06 #1
7 1299
"bingomanat ee" <ed******@manat eebay.com> wrote in message
news:11******** **************@ z34g2000cwc.goo glegroups.com.. .
this simple sql is simply crashing!

SELECT * FROM `xoops_viking_d octypes` WHERE FIND_IN_SET('ma rketing',
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
"bingomanat ee" <ed******@manat eebay.com> wrote in message
news:11******** **************@ i39g2000cwa.goo glegroups.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_d octypes`;

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_c i,COERCIBLE) and
(latin1_swedish _ci,IMPLICIT) for operation 'find_in_set'

Mar 10 '06 #5
"bingomanat ee" <ed******@manat eebay.com> wrote in message
news:11******** **************@ u72g2000cwu.goo glegroups.com.. .
yes; I didn't see it before because I am using a different server now.)

Illegal mix of collations (utf8_general_c i,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
"bingomanat ee" <ed******@manat eebay.com> wrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.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
11056
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? Is imagecreatefromjpeg particularly memory hungry? Immediately prior to the failure memory is given as 2405072 The jpeg being uploaded is 812201 in size Smaller jpegs work fine. jpegs created by different means all seem to fail if the size is...
7
1545
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, len=None): print isinstance(value, str) # error occurs on this line print len(value)
0
298
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 the error module not found. The .NET control was having some std. controls like buttons and text boxes in it. Now I removed all these controls and just tried to create a plain control, and it worked OK. This is strange.
7
2621
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 children - when a child is fork()ed its pid is added to the linked list. I then have a SIGCHLD handler which is supposed to remove the pid from the list when a child exits. The problem I'm having is that very very occasionally and seemingly...
3
1670
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 and say debug and the program halts at the point where the test fails. This makes it very easy to debug the test as you have the stack, locals etc. At them moment I'm having to recompile the main loop to call the failing test and put a break in...
1
1383
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 set a application wide exception handler that would catch exceptions from other threads? Is there a way to setup some kind of structure that would catch the thread itself failing? Thanks
3
3715
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 inhouse webserver running IIS 5.1 and it works correctly. I'm specifing a real path to LoadLibrary of the form C:\domains\...\file.dll (obtained from MapPath)
18
1894
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 checkin. Recently there was a checkin of a test that _should_ work but doesn't. The discussion got around to means of indicating such tests (because the effort of creating a test should be captured) without disturbing the development flow. ...
0
1258
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 AFTER UPDATE ON TABLE1 REFERENCING OLD AS OLD NEW AS NEW
3
1451
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 imdb.com pages (ex: http://imdb.com/title/tt0482606/ ) Can someone help me tweak this, or give insight as to why its failing? I can't spot it
0
10037
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10921
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10541
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8099
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7250
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6142
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4776
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4337
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3360
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.