Hey there

I have the following table structure:

CREATE TABLE documents (
 id int(11) NOT NULL auto_increment,
 user varchar(50) NOT NULL default '',
 olduser varchar(50) NOT NULL default '',
 username varchar(100) NOT NULL default '',
 uploaddate timestamp(14) NOT NULL,
 docdate varchar(100) NOT NULL default '',
 docno varchar(255) NOT NULL default '',
 title varchar(150) NOT NULL default '',
 summary varchar(255) NOT NULL default '',
 content text NOT NULL,
 doctype varchar(80) NOT NULL default '',
 docuri varchar(255) NOT NULL default '',
 vjudge varchar(100) NOT NULL default '',
 vexpert varchar(100) NOT NULL default '',
 vspeciality varchar(150) NOT NULL default '',
 didiversity varchar(100) NOT NULL default '',
 dicity varchar(80) NOT NULL default '',
 didiversitybar varchar(80) NOT NULL default '',
 dilawfirm varchar(200) NOT NULL default '',
 jstate varchar(100) NOT NULL default '',
 jdistrict varchar(100) NOT NULL default '',
 jappellate varchar(100) NOT NULL default '',
 keywords varchar(255) NOT NULL default '',
 PRIMARY KEY  (id),
 FULLTEXT KEY content (content)
) TYPE=MyISAM;

I run the following type of query against it:

SELECT * FROM documents WHERE MATCH (content) AGAINST
('demyer Padgham robinson') AND doctype = 'Motion' AND jstate = 'California:
State Court' OR jdistrict = 'Circuit Court: Federal, California'

For some reason even when doctype is not equal to Motion it still returns these documents. Can someone please let me know where I am going wrong?
The most important thing about the query is that first only documents that match the doctype should be returned so I suppose before even bothering to check the rest of the query only those documents should be found. How do I go about ensuring that only documents that matches the doctype is returned and no other documents.


Thanks for any help on this.

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za

This message contains information that is considered to be sensitive or confidential 
and may not be forwarded or disclosed to any other party without the permission of the 
sender. If you received this message in error, please notify me immediately so that I 
can correct and delete the original email. Thank you.



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to