Hi, I've set up the following table in MySQL 3.23.58 and all seemed to be
working fine:
CREATE TABLE advert (
id INT NOT NULL AUTO_INCREMENT,
userid INT NOT NULL,
make VARCHAR(25) NOT NULL,
model VARCHAR(15) NOT NULL,
year VARCHAR(4) NOT NULL,
price FLOAT(7,2) NOT NULL,
colour VARCHAR(20) NOT NULL,
description TEXT NOT NULL,
county VARCHAR(25) NOT NULL,
approval BIT,
end DATE,
PRIMARY KEY (id),
KEY (make,price),
FULLTEXT(make,model,year,colour,description,county )
);
.... I then added some cars from my PHP front end and started using the
following query:
SELECT * from advert, WHERE end >= CURDATE() AND approval ='1';
It worked
I then wanted to add a keyword search field (hence the FULLTEXT) so changed
by query to:
SELECT * from advert WHERE end >= CURDATE() AND approval ='1' AND MATCH
(make,model,year,colour,description,county) AGAINST ('keyword');
Here I started having problems, here is a sample description for one of my
(6) cars:
Metallic Blue Golf GTi. 153K Miles. FFSR. New exhaust. New front disks and
pads. Kenwood CD player. Detachable parchel shelf. Great car.
If I make the keyword '153k', 'disks', 'shelf', 'pads' etc it works. If
Imake it 'cd', 'front', 'car', 'gti' it doesn't
I have had a look through the other cars/descriptions and realised that the
words that don't work are those that appear elsewhere on different listings.
i.e. my query is unhappy producing more han one result
Can someone please explain why and how to fix this
Cheers 9 2585 Can someone please explain why and how to fix this
After ages of looking at it I've just read something
My problem is a combination of two things
1. < 3 char searches
2. The 50% rule
Soz to waste your time ... 2. The 50% rule
Is there a way I can tell (via PHP) that no result was returned due to the
50% rule or due to their being no records that match the criteria?
Many thanks
Sorry I don't have an answer, I have a question! What's the 50% rule?
(sorry, semi-noob!)
--ScareCrowe
"Aaron Whiffin" <aa***@nospam.com> wrote in message
news:0K***************@newsfe2-gui.ntli.net... 2. The 50% rule
Is there a way I can tell (via PHP) that no result was returned due to the 50% rule or due to their being no records that match the criteria?
Many thanks
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =----- Sorry I don't have an answer, I have a question! What's the 50% rule? (sorry, semi-noob!)
If a query produces a result set larger than 50% of the total data set then
it is displayed as empty (i.e. no results)
You can override this with IN BOOLEAN MODE but I'm using MySQL 3.23.58 which
doesn't support this.
So I need to know if an empty result set is empty of retruned as empty as
it's too large .... Sorry I don't have an answer, I have a question! What's the 50% rule? (sorry, semi-noob!)
If a query produces a result set larger than 50% of the total data set then
it is displayed as empty (i.e. no results)
You can override this with IN BOOLEAN MODE but I'm using MySQL 3.23.58 which
doesn't support this.
So I need to know if an empty result set is empty of retruned as empty as
it's too large ....
Couldn't you write a similar query, just adding "LIMIT 1" or something, and
see if that is empty? If it is, then the other would be empty because of no
result, otherwise because the result set was too large...
"Aaron Whiffin" <aa***@nospam.com> skrev i melding
news:zM************@newsfe5-win.ntli.net... Sorry I don't have an answer, I have a question! What's the 50% rule? (sorry, semi-noob!) If a query produces a result set larger than 50% of the total data set
then it is displayed as empty (i.e. no results)
You can override this with IN BOOLEAN MODE but I'm using MySQL 3.23.58
which doesn't support this.
So I need to know if an empty result set is empty of retruned as empty as it's too large ....
Couldn't you write a similar query, just adding "LIMIT 1" or something, and
see if that is empty? If it is, then the other would be empty because of no
result, otherwise because the result set was too large...
"Aaron Whiffin" <aa***@nospam.com> skrev i melding
news:zM************@newsfe5-win.ntli.net... Sorry I don't have an answer, I have a question! What's the 50% rule? (sorry, semi-noob!) If a query produces a result set larger than 50% of the total data set
then it is displayed as empty (i.e. no results)
You can override this with IN BOOLEAN MODE but I'm using MySQL 3.23.58
which doesn't support this.
So I need to know if an empty result set is empty of retruned as empty as it's too large ....
"Hans Christoffer Johansen" <os*******@hotmail.com> wrote in message
news:dD******************@news4.e.nsc.no... Couldn't you write a similar query, just adding "LIMIT 1" or something,
and see if that is empty? If it is, then the other would be empty because of
no result, otherwise because the result set was too large...
Oh you wanna rematch huh?
Sounds like that would do the trick to me!
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
"Hans Christoffer Johansen" <os*******@hotmail.com> wrote in message
news:dD******************@news4.e.nsc.no... Couldn't you write a similar query, just adding "LIMIT 1" or something,
and see if that is empty? If it is, then the other would be empty because of
no result, otherwise because the result set was too large...
Oh you wanna rematch huh?
Sounds like that would do the trick to me!
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =----- This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: vze29xhy |
last post by:
I have searched the existing responses in this forum and others and
could not find a solution.
I have a database on MySQL server Version "4.0.13". My table structure
is as follows
TABLE1:MusicCD...
|
by: Aaron Whiffin |
last post by:
Hi, I've set up the following table in MySQL 3.23.58 and all seemed to be
working fine:
CREATE TABLE advert (
id INT NOT NULL AUTO_INCREMENT,
userid INT NOT NULL,
make VARCHAR(25) NOT NULL,...
|
by: Glenn Fleishman |
last post by:
I'm trying to perform a search that I can't find any information about
in MySQL's manuals, discussion groups, or on the Web.
I'm used to using BerkeleyDB's Btree, so I can browse to find the...
|
by: doug |
last post by:
I am doing a search now where I have a statement "FirstName LIKE
'%$firstname%' OR JobTitle LIKE '%$jobtitle%'
how can I do the same statement using full text search, for example
with fulltext I...
|
by: jmdaviault |
last post by:
I want to do the equivalent of
SELECT id from TABLE WHERE text='text'
only fast solution I found is:
SELECT id,text from TABLE WHERE MATCH(text) AGAINST('value' IN BOOLEAN
MODE) HAVING...
|
by: Hrvoje Niksic |
last post by:
I often have the need to match multiple regexes against a single
string, typically a line of input, like this:
if (matchobj = re1.match(line)):
... re1 matched; do something with matchobj ......
|
by: lawrence k |
last post by:
Wierd. Go to this page:
http://www.ihanuman.com/search.php
and search for "yoga"
This query gets run:
SELECT * FROM albums WHERE MATCH(name,description) AGAINST ('yoga')
ORDER BY id DESC
|
by: Pythor |
last post by:
OK I'm trying to create a sql query on our as400. I have a main table
like this:
acct prf acct no. sku
AAA 123 ABCD
AAA 123 XYZ
I have...
|
by: Chris L. |
last post by:
Imagine a situation where a customer buys products and is awarded free
articles if s/he buys predefined sets of products.
For example if s/he buys twenty articles, among them a "cereal bowl",
a...
|
by: socc16e |
last post by:
I have an excel sheet that I have imported into SQL 2000 and I need to match the values in one to the values in another and have them output the matching codes to a separate table or file.
After...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |