You can't create a multi-col full text index. You should only create it
on the long text field
'Course you can.
mysql create table a(a int, b varchar(50), c text);
Query OK, 0 rows affected (0.01 sec)
mysql create fulltext index fulltext_bc on a(b,c);
Query OK, 0 rows affected (0.01 sec)
Would someone show me a sample query from the table? I have tried to
get this to work during the past half hour and I don't understand this
type of query yet.
Where I am at with my search query that doesn't work is:
SELECT MATCH ( 'product_description_search') AGAINST ( 'Jesus') FROM
I don't understand what is going wrong:
CREATE FULLTEXT INDEX
ON shopping_cart_product(product_name, product_description)
gives me this error:
#1064 - You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'ON
On 5/30/08, Ron Piggott [EMAIL PROTECTED] wrote:
I don't understand what is going wrong:
CREATE FULLTEXT INDEX
ON shopping_cart_product(product_name, product_description)
gives me this error:
#1064 - You have an error in your SQL syntax; check the manual that
corresponds to your
Ok. I have the index created.
ALTER TABLE `shopping_cart_product` ADD FULLTEXT
( `product_description`,`product_name` )
is what worked --- I think the web site
http://dev.mysql.com/doc/refman/5.0/en/create-index.html was assuming
the creation of a new table.
I am able to have both columns
Someone referred me to:
http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html
Does this look like I am on the right track?
Ron
SELECT MATCH(shopping_cart_product.product_description,
shopping_cart_product.product_name) AGAINST ('$keyword') as Relevance
FROM ( shopping_cart_category
Ron Piggott wrote:
Someone referred me to:
http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html
Does this look like I am on the right track?
Ron
SELECT MATCH(shopping_cart_product.product_description,
shopping_cart_product.product_name) AGAINST ('$keyword') as Relevance
FROM
I am getting the following error when running the query through php my
admin:
MySQL said: Documentation
#1191 - Can't find FULLTEXT index matching the column list
I am new to this; Thank you for the help.
Ron
On Wed, 2008-05-28 at 22:01 -0400, Ron Piggott wrote:
Someone referred me to:
Ron Piggott wrote:
I am getting the following error when running the query through php my
admin:
MySQL said: Documentation
#1191 - Can't find FULLTEXT index matching the column list
Grr - stupid manual didn't have a link on how to create the index.
Thanks Chris,
By the way do you have problems with spammers getting your gmail address
from usenet?
The user_id is actually what I'm searching for dynamically, so my initial
query was relatively correct as it returns one row with user 1.
However, I wasn't familiar with the concept of
Hello,
I am trying to find out how to search a many-to-many map table efficiently.
I have an example table:
user,user_group
1,1
1,2
2,1
3,2
I want to find out all the users who are a member of BOTH groups 1 AND 2. In
this example, this would just be the user with id 1.
Until now, I can
Steve McGill wrote:
Hello,
I am trying to find out how to search a many-to-many map table efficiently.
I have an example table:
user,user_group
1,1
1,2
2,1
3,2
I want to find out all the users who are a member of BOTH groups 1 AND 2. In
this example, this would just be the user with id 1.
you must have three tables
user (have at least user_id field)
group (have at least groupd_id field)
user_group (have 2 fields: user_id and group_id, you can also have
user_group_id - depends on your need)
/* if you only need the user id */
select user_id from user_group where group_id in (1,2);
I have been playing tonight for a few minutes.
The following code:
?
$lineArray = file(/home/actsmin/www/home_page.html);
// make an empty variable first
$content = ;
// concat all array element
foreach($lineArray as $eachLine) {
if ( eregi(a href= , $eachLine) == 1 ) {
#line contains a
eregi_replace or str_replace can do that for you
Bastien
From: Ron Piggott (PHP) [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: PHP DB php-db@lists.php.net
Subject: [PHP-DB] Searching PHP strings
Date: Thu, 28 Sep 2006 21:12:18 -0400
I have been playing tonight for a few minutes
Ron Piggott (PHP) wrote:
If $file_name includes the path
/path/to/file/file_name.pdf
is there anyway of searching from the right hand side to the left and
getting the file name out the $file_name variable? The file name starts
the character following the last /
http://www.php.net/pathinfo
I have a web site and google likes to count the inbound links. I have set
up a way for people to add links from my site to theirs, however I would
like to check whether they have linked back to my site. I ask them to
nominate where the link back page is, and I could check this manually. But
you could probably use curl to grab the source for the page then use a regex
to see if your domain is found maybe something like
if(preg_match(/www\.domain\.com/is)) // match found
else // not found
dont quote me on the regex as i am not very good with regex, also you would
want a button in the
hi
i had designed an inventory management system where
in i can ADD,INSERT,DELETE,UPDATE the data
elements..but when i am trying to find(search) an
entry in theinventory data base system (i want to find
the entrybased on the tagno since this is the
primary key in my table) the logic i had
PROTECTED]
Subject: [PHP-DB] searching an entry in inventory db
Date: Sat, 4 Dec 2004 10:14:52 -0800 (PST)
hi
i had designed an inventory management system where
in i can ADD,INSERT,DELETE,UPDATE the data
elements..but when i am trying to find(search) an
entry in theinventory data base system (i
Aravalli Sai wrote:
hi
i had designed an inventory management system where
in i can ADD,INSERT,DELETE,UPDATE the data
elements..but when i am trying to find(search) an
entry in theinventory data base system (i want to find
the entrybased on the tagno since this is the
primary key in my table)
Hi all,
Does anyone have a class or function that can be used to search any
given string from a textfield ie:
$string = london rome paris...
Thanks in advance!
R
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
stristr();
http://us2.php.net/stristr
-Micah
On Sun January 11 2004 8:29 pm, Rick wrote:
Hi all,
Does anyone have a class or function that can be used to search any
given string from a textfield ie:
$string = london rome paris...
Thanks in advance!
R
--
PHP Database Mailing
I currently manage a MySQL database with about 3 records. I've given my users the
ability to search the name field by pattern.
For example, the name field can hold 36 characters and contains first name, middle
initial and last name. example:
NAME
John D Miller Jr.
Harry B Davis
Angela De
Hi, I need a way of searching a file for text between two brackets, below
is an example of a couple of lines from the file I'm searching:
trtdfont size=2{L_LOGIN}/font/td/tr
trtdfont size=2{L_LOGOUT}/font/td/tr
So I'll need to search the above for text between the '{' and '}' brackets
and read
-Original Message-
From: Jamie Saunders [mailto:[EMAIL PROTECTED]
Sent: 16 July 2003 11:20
Hi, I need a way of searching a file for text between two
brackets, below
is an example of a couple of lines from the file I'm searching:
trtdfont size=2{L_LOGIN}/font/td/tr
trtdfont
Hi,
I have a table in DB Music that looks a little mike this:
TABLE NAME
_
SONG NAMESONG LYRICS
| | | |
| | | |
|
:
Subject: [PHP-DB] Searching DB and
Printing Results
12/30/2002 11:53 AM
Trilogy International, Inc
http://www.trilogyintl.com/ecommerce/
---
-Original Message-
From: Mike Delorme [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 30, 2002 11:54 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Searching DB and Printing Results
Hi All!
I'm searching for Datagrid component for php and mysql. Something like java
ones.
Does anyone knows one?
Thanks
Paolo
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
in ym search page, i construct a sql query from user input to search my
database, and i run this query to get totalresults. Then run another query
with a LIMIT 0, 30 ending for each page. So I'm running 2 mySQL queries per
page. My question is, is this inefficient? is there any better way i dont
Is there any way to search *every*thing in my database (using mysql)? I
am thinking of a query somethng like select * from * where * LIKE
'%putsearchhere%'. This would help a lot when searching for
inappropriate language.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe,
Iv been trying to find an open source software that would calculate the
number of data retrievals (from certain fixed IPs)from MySQL database. Any
idea where I could find such a script?
Henri
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit:
Hi there everyone,
Say I do a simple search as follows:
$query = SELECT * FROM search WHERE
(description LIKE '%$test%' OR state LIKE '%$test%' OR city LIKE '%$test%' OR fname
LIKE '%$test%') AND (category = '$category' AND country = '$country' AND type =
'$type') ORDER BY city ASC LIMIT
You could select these results into a temporary table
and then query that table. Look at the mysql.com docs
and check out the CREATE TEMPORARY TABLE. You can
select data right into the table and the table is
erased when the connection closes.
But first it looks like cleaning up your query would
Hi there,
Thanks for your help on this it's appreciated, i'll look into temporary
tables tomorrow and see what I can do. Just curious, why is the method you
have shown below better than the method I used previously? Is it a speed
thing or is it more logical? I am learning different methods of
Subject: Re: [PHP-DB] Searching results of results
Hi there,
Thanks for your help on this it's appreciated, i'll look into temporary
tables tomorrow and see what I can do. Just curious, why is the method
you
have shown below better than the method I used previously? Is it a speed
thing
What I am doing is user inputs their contact information, then copies and
pastes text and also uploads a formal document, which the location is stored
in the database.
Now, the text that gets pasted into the text field is then stored into the
database for search purposes.
This is the problem...
On Sunday 10 February 2002 00:58, Todd Williamsen wrote:
What I am doing is user inputs their contact information, then copies and
pastes text and also uploads a formal document, which the location is
stored in the database.
Now, the text that gets pasted into the text field is then stored
I was wondering if there is a way to search documents.
Scenario:
I have a application where it uploads MS Word documents to a server and
holds the documents location in the database. What I want is to be able to
search those Word documents via keywords.
Is this possible with PHP?
--
PHP
Hello!!!
Use LIKE in your Select statement...Like this!!
$sql = Select File_Name From Table2 WHERE File_Name LIKE '%$Search%';
$Search would come from a form...
Dan
On Friday, February 8, 2002, at 09:06 AM, [EMAIL PROTECTED] wrote:
I was wondering if there is a way to search documents.
So that statement would actually open up the MS Word document and search
it for the keywords specified?
-Original Message-
From: Dan Brunner [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 9:34 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Searching
Hi there everyone,
Thanks for all the help recently everyone, it's very appreciated. I just have one
last question if that's ok :-)
I have a string taken from a form, now this string could contain 1 word or it would
contain 10, what I need to know is how do I search a DB for each word in the
engine yet :)
// -Original Message-
// From: Chris Payne [mailto:[EMAIL PROTECTED]]
// Sent: Thursday, 17 January 2002 10:34 AM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] Searching a variable
//
//
// Hi there everyone,
//
// Thanks for all the help recently everyone, it's very
hello,
I want to create a database search with php/mysql that searches for zipcodes
in a database. of course, there will be other columns/tables and such to be
printed, but I only want to search for the zipcodes and have the other cells
printed if the following criteria are found:
lets say I
full-text index that field in MySQL, - then query ordered by weight with
a limit 3. Wonderful stuff.
-Original Message-
From: dean james
Sent: Sat 11/10/2001 7:27 PM
To: [EMAIL PROTECTED]
Cc:
Subject: [PHP-DB] searching
.
Good Luck.
-Original Message-
From: Jordan Elver [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 21, 2001 9:03 AM
To: MySQL Mailing List; PHP DB Mailing List
Subject: [PHP-DB] Searching MySQL using LIKE
Hi,
I'm cross posting this because it's applicable to both list
Jason Wong [EMAIL PROTECTED] wrote in message
news:000301c1428d$f11b3a80$[EMAIL PROTECTED]...
The obvious first thing to do is to screen your keywords. Do not search on
common words such as:
and, if, the, in etc.
An easy way to do this is to set up an array of words
to exclude. Then you
I have summaries of episodes stored in a database. How on earth do I go
about highlighting keywords? I mean I have done a search and it gives a list
of urls:
episodes.php?id=4highlight=max
But how do I get it to go through all the words and highlight max or
whatever keyword it is??
you could probably use a str_replace() www.php.net
$description1 = Episode 1 - Joey eats all of the food
in the house;
Suppose the search term is food - just go thru and
replace food with bfood/b or whatever tags you
want to use.
olinux
--- Matt C [EMAIL PROTECTED] wrote:
I have summaries of
Just an idea...
You could do a str_replace(), replacing max with
span style=background-color: yellow max /span
You may need to use a reg-exp replace function to determine where actual
words are like max, vs. substrings like maximus.
see http://www.php.net/manual/en/function.str-replace.php
I have a database in mysql that only has one table, that table has approx 25
fields . I need to be able to search for data under each of these
fields.
Field examples: Company, TechContact, AdminContact, Mobile etc etc
I need I guess a pull down menu that would select a field (c above) then
Hi Devon!
Take a look in the PHP documentation in the function reference for mysql
function.
There you'll find a set of function for connecting to the database and doing
SQL - Querys over the database. If you are not famular with SQL (SELECT -
Statements)
you have to learn :)
bye Marcus
Devon
]]
Sent: 04 September 2001 02:15
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Searching database tables
I have a database in mysql that only has one table, that table has approx 25
fields . I need to be able to search for data under each of these
fields.
Field examples: Company, TechContact
As per topic anyone know how to do it?
Cheers
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Yes.
If you have a specific question, please post it and I'm sure folks will be
willing to try to help you out.
Doug
At 12:50 PM 9/3/01 +1000, Devon wrote:
As per topic anyone know how to do it?
Cheers
--Doug's Signature File
~ ~ ~ I'm proud to work
56 matches
Mail list logo