Re: [PHP-DB] Searching shopping cart

2008-06-01 Thread Chris
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)

Re: [PHP-DB] Searching shopping cart

2008-06-01 Thread Chris
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

Re: [PHP-DB] Searching shopping cart

2008-05-30 Thread Ron Piggott
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

Re: [PHP-DB] Searching shopping cart

2008-05-30 Thread Bastien Koert
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

Re: [PHP-DB] Searching shopping cart

2008-05-30 Thread Ron Piggott
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

[PHP-DB] Searching shopping cart

2008-05-28 Thread Ron Piggott
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

Re: [PHP-DB] Searching shopping cart

2008-05-28 Thread Chris
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

[PHP-DB] Searching shopping cart

2008-05-28 Thread Ron Piggott
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:

Re: [PHP-DB] Searching shopping cart

2008-05-28 Thread Chris
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.

Re: [PHP-DB] Searching many-to-many map tables

2007-02-08 Thread Steve McGill
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

[PHP-DB] Searching many-to-many map tables

2007-02-07 Thread Steve McGill
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

Re: [PHP-DB] Searching many-to-many map tables

2007-02-07 Thread Chris
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.

Re: [PHP-DB] Searching many-to-many map tables

2007-02-07 Thread J R
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);

[PHP-DB] Searching PHP strings

2006-09-28 Thread Ron Piggott (PHP)
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

RE: [PHP-DB] Searching PHP strings

2006-09-28 Thread Bastien Koert
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

Re: [PHP-DB] searching through a string

2006-09-17 Thread Chris
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

[PHP-DB] Searching remote web sites for content

2005-10-22 Thread ioannes
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

Re: [PHP-DB] Searching remote web sites for content

2005-10-22 Thread Joseph Crawford
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

[PHP-DB] searching an entry in inventory db

2004-12-04 Thread Aravalli Sai
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

RE: [PHP-DB] searching an entry in inventory db

2004-12-04 Thread Bastien Koert
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

Re: [PHP-DB] searching an entry in inventory db

2004-12-04 Thread Doug Thompson
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)

[PHP-DB] Searching a String mysql

2004-01-11 Thread Rick
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

Re: [PHP-DB] Searching a String mysql

2004-01-11 Thread Micah Stevens
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

[PHP-DB] Searching a name field

2003-11-06 Thread Manuel Ochoa
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

[PHP-DB] Searching a file for text surrounded by brackets

2003-07-16 Thread Jamie Saunders
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

RE: [PHP-DB] Searching a file for text surrounded by brackets

2003-07-16 Thread Ford, Mike [LSS]
-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

[PHP-DB] Searching DB and Printing Results

2002-12-30 Thread Mike Delorme
Hi, I have a table in DB Music that looks a little mike this: TABLE NAME _ SONG NAMESONG LYRICS | | | | | | | | |

Re: [PHP-DB] Searching DB and Printing Results

2002-12-30 Thread Jeffrey_N_Dyke
: Subject: [PHP-DB] Searching DB and Printing Results 12/30/2002 11:53 AM

RE: [PHP-DB] Searching DB and Printing Results

2002-12-30 Thread Matthew Moldvan
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

[PHP-DB] Searching for Datagrid

2002-09-22 Thread Paolo Zani
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

[PHP-DB] Searching...

2002-07-18 Thread Georgie Casey
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

[PHP-DB] Searching everything?

2002-05-24 Thread Leif K-Brooks
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,

[PHP-DB] searching for a software

2002-05-10 Thread Henri
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:

[PHP-DB] Searching results of results

2002-03-19 Thread Chris Payne
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

Re: [PHP-DB] Searching results of results

2002-03-19 Thread olinux
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

Re: [PHP-DB] Searching results of results

2002-03-19 Thread Chris Payne
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

Re: [PHP-DB] Searching results of results

2002-03-19 Thread Remco Oosten
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

[PHP-DB] Searching records...

2002-02-09 Thread Todd Williamsen
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...

Re: [PHP-DB] Searching records...

2002-02-09 Thread Jason Wong
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

[PHP-DB] Searching Documents

2002-02-08 Thread Todd Williamsen
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

Re: [PHP-DB] Searching Documents

2002-02-08 Thread Dan Brunner
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.

RE: [PHP-DB] Searching Documents

2002-02-08 Thread Todd Williamsen
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

[PHP-DB] Searching a variable

2002-01-16 Thread Chris Payne
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

RE: [PHP-DB] Searching a variable

2002-01-16 Thread Beau Lebens
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

[PHP-DB] searching for zipcode: where to start?

2001-11-10 Thread dean james
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

RE: [PHP-DB] searching for zipcode: where to start?

2001-11-10 Thread Gonzalez, Lorenzo
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

Re: RE: [PHP-DB] Searching MySQL using LIKE

2001-09-21 Thread Russ Michell
. 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

Re: [PHP-DB] Searching MySQL using LIKE

2001-09-21 Thread Hugh Bothwell
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

[PHP-DB] Searching/keywords

2001-09-20 Thread Matt C
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??

Re: [PHP-DB] Searching/keywords

2001-09-20 Thread olinux
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

Re: [PHP-DB] Searching/keywords

2001-09-20 Thread Jason G.
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

[PHP-DB] Searching a table

2001-09-04 Thread Devon
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

Re: [PHP-DB] Searching sql database using php

2001-09-03 Thread Marcus Tobias
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

RE: [PHP-DB] Searching database tables

2001-09-03 Thread Seb Frost
]] 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

[PHP-DB] Searching sql database using php

2001-09-02 Thread Devon
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]

Re: [PHP-DB] Searching sql database using php

2001-09-02 Thread Doug Semig
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