Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





MySQL Full-Text Searching


I am reading this article that says by default, the ft_min_word_len is 4 characters and the ft_max_word_len is 84 characters. I don't have access to the MySQL configuration file, is there a way to change the full-text word length settings like using .htaccess?

I access my MySQL using phpMyAdmin, which is shared with a bunch of other users. So I have no rights to make modification whatsoever. Is there a way to modify just my table in there?




View Complete Forum Thread with Replies

Related Forum Messages:
Full-text Searching Two Tables
I'm trying to create a full-text search engine for my blog. I read the tutorial, and I grasp the basics of how to search a single table.

However, when a user enters a search term, I want to search both the table of blog posts (vsns_news) and the table of comments (vsns_comments) for the term and treat the results on equal footing.

That is, I don't want to display first the results from blog posts and then the results from comments: they should intermingle in order of decreasing relevancy.

However, I can't for the life of me come up with a query that will search both tables and return a combined result set for them. Is there a way to use just one query?

View Replies !
Full Text Searching MSWord Files
I have a project that require to full text search some user uploaded documents on a Linux PHP based server. I basically need to open the word (.doc) files and full text search them, than simply allow the user to retrieve them.

I know on win based servers you can use the COM module to read word file, my question is if anyone has figured out how to do the same on Linux. Code:

View Replies !
Gaining Access To How MySql Parses Text For Full Text
I want to gain access to the function or process MySql uses to parse words and phrases for Full Text searching. Here is an example.

If the user inputs...

Milan in history

MySql will search for milan, history, and milan history. Is there a way to extract just the combination of terms MySql uses to search the db without the stop words? Stop words are automatically eliminated from the search request unless the user encloses a phrase in quotes.

What I am trying to do is develop a script to highlight found search terms and phrases. I can explode a phrase into single words but if I do that the stop words would be included in the array. If there is some way of getting into the parsed words or phrases MySql Full Text actually uses to search, I can use each of those combinations as a keyword in my highlighting script.

This request is about searching for the code or any code related to the questions involved.

View Replies !
Full Text Search ( Mysql )
I was searching the sql man , for some good ways to search a mysql db. so i found that Full text search the best way is to go becease LIKE just gives to mutch output.PHP Code:

View Replies !
Full-text Search Mysql
I building a little site using PHP and mysql. Now I want to make full
text searches on some columns in one table. The problem is that I have
25 colums in the table that I want to put at full-text index on. I
belive there is a limitation of 14(?) colums. What is the proper way
to handle this?

Reading about full-text indexes, do I have to make a "repair table..."
after each time I insert data in the table the will be included in the
indexed columns? If this is the case I must repair the table every
time I insert anything?!

I am using "DBDesigner 4". How can I see in my table that it is a
full-text index. Seems like it appears as a normal index in my data
definition as well as in the reversed engineered graphical
interface.

View Replies !
MySQL 5.0, FULL-TEXT Indexing And Search Arabic Data, Unicode
MySQL 4.0, FULL-TEXT Indexing and Search Arabic Data, Unicode

[This version has a couple subtle edits from the orginial I posted
on mailing.database.myodbc - I'm cross posting here on this
topic/subject related newsgroup]

I was wondering if anybody has experienced the same issues
challenges I'm experiencing I'll describe shortly. Once
resolved some fascinating and powerful multi-lingual
apps incorporating non-English/latin character sets can be
realized by many developers.

I have a Unicode utf8 English - Arabic - Hebrew - Greek (and
several other languages) database in Microsoft Excel. I KNOW
that it is Unicode utf8 data because MySQL tells me it
recognizes the encoding as such but not in the context I want.

Allow me to explain ...

I can search the Unicode utf8 encoding with no problem in
Excel. While in Excel I highlight a complete word or a
partial string of an Arabic word copy it to the clipboard
(i.e. memory). I then do a find and the process is the
same successful result as if it was an English string.

MySQL 5.0 is supposed to handle Unicode utf8

I created a MySQL database I named: languages

CREATE DATABASE languages ;

and I implemented the following command on a MySQL
command prompt:

ALTER DATABASE languages DEFAULT CHARACTER SET utf8;

No problem (so far) MySQL seemingly recognized utf8 and
accepted it. My understanding is with the ALTER command
the tables I create against languages will be utf8.

I now created a table I named mainlang which denotes it
will be the main table for my languages.

mysql>CREATE TABLE mainlang
->(
->langNumID varchar(30),
->colB varchar(30),
->colC varchar(30),
->primary key (langNumID, colB)
->);

Again so far no problem: Table successfully created.
My third column 'colC' is where the Unicode data
will be stored.

I now attempt to import the database from my
Excel file into my MySQL database as follows:

mysql>load data infile 'c:arabicdictionary.csv'
->into table mainlang
->fields terminated by ','
->lines terminated by '
'
->(langNumID, colB, colC);
ERROR 1406 (22001): Data too long for 'colC' at row 1

So what to do? I did a search and found other
people seemingly had the same problem and someone
suggested:

ALTER DATABASE languages DEFAULT CHARACTER SET cp1250;

I dropped mainlang, recreated it, redid the load and
Lo and behold ... it seemed to work. No Data too long
error occurred and when I did the following query:

mysql>select langNumID, colB, colC
->from mainlang
->where colB = ��'

I see colA have a correct numeric value, colB a
correct numeric value (4994) and for colC a string of
unintelligible characters with diacritical marks,
oomlats etc. which I know is the cp1250 encoding
interpretation of the Unicode utf8 data which is
similarly unintelligible in its own regard.

Now what I try is: do a copy of the obscure colC
cp1250 character string into the clipboard/memory
and then do the following tweak on the original
select statement to see if I can search on the
(now) cp1250 character string:

mysql>select langNumID, colB, colC
->from mainlang
->where colc = 'paste of the cp1250 character string'

The computer would not allow a paste unless I pressed
the escape key. On initiating this select command
I got an empty set (no match)

My questions are:

Has anyone been successful creating a Unicode utf8
MySQL database that accepts Arabic?

If yes, how did you get around or not encounter the
Data too long issue?

Have you tried the cp1250 (or cp1251 - same mechanics
same results) work around as I have? Are you
able to search the cp1250 character string (my colC)?
If yes, how did you successfully manage to do it?

Lastly, if I take the cp1250 encoded string and paste
it into Excel ... I can string search the cp1250
encoding with no problem.

Also, here's how I know my Unicode utf-8 data is
correct apart from my own manual cross-referencing
and being recognized by MySQL in some respect:

When I copy the Unicode utf8 encoding and try to
paste it into the select command to see what would
happen I get the following error:

ERROR 1257 (HY000): Illegal mix of collations
(cp1250_general_ci, IMPLICIT) and
(utf8_general_ci, COERCIBLE) for operation '='

So what I have here is a situation where MySQL
is recognizing Unicode utf8 encoding but not
from the respect of packing a table!

Go Figure ...

View Replies !
Full Text Search After Upgraded Mysql To Lastest Version Not Working
i upgraded mysql to lastest version one of my query worked right in previos version but it doesn't work now. i have a table with "test" name and 4 fields (id,title,intro,content)
these fields are full text: Code:

View Replies !
Full Text RSS
I am trying to built up an script that will produce Full Text RSS from Partial Feeds/RSS, but I couldn't figure out from where I have to start.

Furthermore I wanted to filter-out certain data like graphics, adsense code, html code etc from the RSS. Code:

View Replies !
Full Text
I'm trying to tweak my search engine a bit and I've discovered a weird lil' glitch. My SCORE variable for every single entry is coming back as a Ƈ'. It's not a floating number like the examples are in the MySQL manual. PHP Code:

$query_articles = "SELECT *, MATCH(body, title, subject1, subject2, author) AGAINST ('$searchtopic' IN BOOLEAN MODE) AS score FROM data_array WHERE MATCH (body, title, subject1, subject2, author) AGAINST ('$searchtopic' IN BOOLEAN MODE) AND live_timestamp < $now AND `live` = 1 ORDER BY score DESC";

View Replies !
Full Text Search
First off, I'm using MySQL 3.23 so I'm not sure if Full Text Searches are even in that version since there isn't any documentation for versions before 4. Code:

View Replies !
Full Text Query
I have a very simple query in php:

$query = "SELECT *, MATCH(products_name, products_description, products_keywords, products_notes)
AGAINST ('carb') AS score FROM products
WHERE MATCH(products_name, products_description, products_keywords, products_notes)
AGAINST ('carb') ORDER BY score DESC";
$result = mysql_query($query) or die('Error, query failed');

I get "query was empty", but when i put this query in phpmyadmin, it works fine.

View Replies !
Full-text Indexing Of Pdf, Rtf, Txt, Html
I have a big pile of files on my local machine that are in a variety of
formats - txt, rtf, pdf, html, etc. What I'm looking for is a script
that will crawl through the files and perform simple full-text indexing
on them, and will allow for queries to be executed on the index.

I gave PHPDig a shot but it prefers web-based setups - my files are all
stored locally and will only be accessed locally.

View Replies !
% Wildcard & FULL-TEXT Searches
With regards to this SQL statement.... It works great for multi-word searches but those searches have to be spelled correctly. I have discovered two FLAWS:

1. It does not allow for partial matches: i.e. 'shane' if the search is spelled 'shan' it will not find it. I cannot figure out how to get the '%' Wildcard into this statement so it will work.

2. It will ony show results for the first column the search word(s) are found in.

For example, I type in 'shane' and I will get all listings for 'shane' only from the 'wname' column. The search query stops at the first column 'wname' in the SQL statement below and ignores that 'shane' is also located in several other columns and records. Code:

View Replies !
Boolean Full Text Search
I use MySql boolean full text search for searching and i allow user to search for phrases with 'and' and 'or' operators in it, but it doesn't work for certain words, like 'use' and 'due'. Search ignores these words. Well, 'use' is a full-text stop word, but why 'due'? Is it because it's a 3 letter word or something? how to overcome this problem or is there any better search engine for me to use with php & MySql?

View Replies !
FULL-TEXT Search Not Working?
I'm doing a Full-Text search on MySQL. My table structure is as follows:

articleID,articleTitle,articleContent
articleContent is a FULL-TEXT Index.

There are about 70 articles some which contain the "keyword" example below. For some reason I'm getting ZERO rows returned and I'm not sure why.

I figured maybe my version of mysql was too old, but it is version 4.1.24 which according to the manual should support the following:

SELECT articleTitle FROM PressArticles WHERE MATCH (articleContent) AGAINST ('Miami');

However, it doesn't give back any results. I'm thinking I did something wrong in the query itself, but after 2 hours I just cant see what is wrong with it.

I'm trying to get the Titles of the articles that have the word Miami in the content.

View Replies !
Full-text Boolean Search
I have just started working on full-text boolean search.I have coded the program but I get an error :

You have an error in your SQL syntax near 'boolean mode)' at line 1

The fields in mysql table 'pubs' are :id,author,title,year. Here's my code:

View Replies !
Full Text Search More Than One Table
I'm building a full text search but would like the search term ($id) to search more than on table.

$query = "SELECT * FROM titles, artists WHERE artists.id = titles.artist_id AND MATCH(artists.artist, titles.title, titles.content) AGAINST ('$id')";

I get the following error (the query work if I search only one table i.e. titles) Error in query: SELECT * FROM titles, artists WHERE artists.id = titles.artist_id AND MATCH(artists.artist, titles.title, titles.content) AGAINST ('music').

View Replies !
Boolean Full Text Searchs
So i've got the basic jist of how the boolean searches for full text myisam databases work, One small gripe that I have a concern with and thats literal string searching. By default when you type in a search, For example the word "QUIT" it literally only finds a word that matches exactly "QUIT". However, I would like to figure out somehow to automatically add wildcard to the end of that to take any result with the word quit in it, Such as "QUITE" or "QUITS" or even "QUITESSON".

View Replies !
Full-text And Sort By Score?
how to sort full-text by score. This is the query I'm using right now.

sql = "SELECT product_id, bild, bilden_forestaller FROM products WHERE MATCH (bilden_forestaller) AGAINST ('$fritext')";

I have tried several ways but I can't get it to work. Please tell me how to rewrite my query. I also want to show the score (in percent) for every row I get back from the query.

View Replies !
Full Text Search Any Records
The following query does not bring back any records but they are definitely there For example the category field contains the words "Designer Men" and the brand is "Duck And Cover" (in the mySQL db). This code is a direct copy of another query but for "ladies ladie women women's" and it works prefectly this is why i do not understand it Here is the offender: PHP Code:

$num3 = getPORProducts("SELECT * FROM por WHERE MATCH(longDescription, category, description, brand, name) AGAINST('+"Duck &amp; Cover" "Duck and Cover" "Duck & Cover" +(mens men's men)' IN BOOLEAN MODE)");

p.s. to save you some time the problem is definitely with the code above, and has nothing to do with the functions i have created.

View Replies !
Full Text Search In PDF And Word Files ?
I need to perform full text searches on a batch of PDF and Word files.
What is the best way to go?

After some research, I'm thinking of extracting the plain text from the
files with "pdftotext" and "catdoc", hamonizing the various possible
encodings to UTF-8, storing the text in a MySQL database, and then
using the full text search capabilities of MySQL.
Do you think that would work well? I am told that the files are mostly
text and won't be longer than 30 pages.

View Replies !
Full Text Search With Pagination Class
I've used the Full Text search example from this site and added the pagination class from http://www.goodphptutorials.com/article/show/simple-php-mysql-pagination/1 but I'm stumbling where it actually breaks the page up into the prescribed number of page. Right now I have script set for 5 results per page and while I can get the total number of records in the search result set, I can't get the results to span over say 3 pages if there's 15 results. Code:

View Replies !
How Do I Echo Out Relevence In Full Text Search?
I wonder how to echo out relevance when doing a full text search? Here is my code that do the search:

$result = mysql_query("SELECT product_id, picture AS relevance FROM products WHERE MATCH (picture_is) AGAINST ('$keyword')");

I know how to echo out the result, but I also want to echo out the relevance like I have seen on some websites. I also tried the query in phpmyadmin and could see the relevance, just don't know how to get it in php.

View Replies !
Creating Temporary Table From Full-text Query
i'm using a full-text search on my db which works fine, but now i'm working on filtering the results further, like products in range of prices. my logic is to simply SELECT them out of the temporary table, only if it would be created. i don't think i need to paste any code since i think you get the idea.

View Replies !
Full Text File Search With Indexing Service On Windows
Here's a short tutorial on how to the OLE-DB extension to access
Windows Indexing Service. Impress your office-mates with a powerful
full-text search feature on your intranet. It's easier than you think.

First, download and install the extension
(http://sourceforge.net/project/show...kage_id=198554).
Simply unzip the file and copy the correct version of php_oledb.dll
into the PHP extensions folder. Then add the line
extension=php_oledb.dll in php.ini and restart your web server.

Now, if Indexing Service isn't running on your computer, turn it on. Go
to Control Panel Administrative Tools Services and configure
Indexing Service to start automatically. You can also ask the little
dog in the search window to do it for you if you're using Windows XP.
You will need to wait a while for Windows to build the initial index.
It could take a couple hours.

Once the extension is installed and the index is ready, you can start
coding. To connect to Indexing Service, you use the oledb_open
function:

$link = oledb_open("Provider=MSIDXS");

You then call oledb_query with a SQL statement. Let us start with
something simple: We'll look for all files on the computer containing
the word "love": .....

View Replies !
Give User A Choice Of Fields To Search With Full Text/Boolean?
I want to give the user the option of searching a combination of the fields $Topic, $Subtopic, $Theswords in Boolean/Full Text. The problem is if I make any of the fields empty prior to the query, I get a MySql syntax error message. The user has the option of selecting fields via checkboxes, but when the field is not selected the user will get the error message because the variable is empty in the query statemtnt.

Are there any code suggestions for avoiding the error message when a field is not selected by the user to be searched? Code:

View Replies !
Searching Text
I am trying to build a banner manamgment system that works fine except the user has now stated they will be using .swf files aswel as jpgs and gifs. I have in place my <img src> code which then grabs the image form the DB, but i need to have a script that first checks the file name to see what it is, and if its a jpg it runs the img src tag if its an swf it runs the swf tag. how i can get the correct extension out of the file name field.

View Replies !
Searching A Text File
I want to be able to search for text in a text file. For example if there was this in a text file:

php1:mysql1
php2:mysql2
php3:mysql3
php4:mysql4
apple:orange
php5:mysql5
php6:mysql6
php7:mysql7
php8:mysql8
php9:mysql9

I want to be able to search for the word "apple" and then echo what is next to it, which would be "orange". How would I go about doing this? Also, if I were to search through these files in php daily with a lot of people searching through them, would my text files become corrupt?

View Replies !
Searching In Text File?
so i got txt file:
-------------------------
id|name|age
1|bull|29
2|yoshi|21
3|ivan|29
-------------------------

i want script to do
-search for a strings in file
-when string found in line output this line fields name and age

for example if i wrote in search - ivan
it returns - ivan is 29 years old

if searching - 29
it return bull is 29 years old, ivan is 29 years old

do i need to use strings

PHP Code:

View Replies !
Searching HTML Code For Text
I have outputted the contents of my Winamp playlist into an HTML file. I have noticed that the songs are the only text surrounded by plain <TD> tags.

I was wondering if there was a way to go through the code and using a WHILE statement or something, input each song into a database by selecting anything between the <TD> and </TD> tags.

View Replies !
Align Text And Searching Files
i would like to align my following code so that it sets it to the left side of the ;page. ive tried a few things but didnt work. also i would like to have it so that it only searches for picture and movie files. how would this be accomplished? Code:

View Replies !
Reading, Writing And Searching On Text Files
I want to read a text file and check for a special word on it, how can I do that? Also I want to search for a special word such as "?>" and write something on the line that preceeds it if u see what I mean.

View Replies !
How Do I Delete A Full Row In Mysql ?
how do i delete a full row in mysql ?

View Replies !
Displaying Full URL Address From Mysql DB
Hi all

I am having a problem, displaying a field form my mysql db.

the field is a text varchar(80) containing url's (web addresses more importantly).

the issue is, when a user enters into the db an address without the 'http' suffix on the start of the url, I try to display it.. but obviously the browser then renders it as a file to the root directory when actually its an entire new url. Did I explain that good enough?

View Replies !
Full Stops In Mysql Queries
I am using Mysql to search for domains in a database. For example: PHP Code:

SELECT COUNT(*) FROM domains WHERE domain = 'phpbuilder.com'

The problem is that the query will always return 0 whatever domain I input (that is present in the database). Unfortunately I built some more complicated parts of this script before testing the query itself so it took me a little while to figure out the problem was because of the full stop. If I remove the full stop in the database and use domaincom in the SQL query then the query works fine.

View Replies !
Showing Full 2d Array On Screen From MySQL
I have successfully created a MySQL database, and inserted a table "65chain" into it.

The table has 10 columns, including the primary key column Drop_1, and 6 rows. The Drop_1 column is indexed at 600, 800, 1000, 1200, 1400, and 1600. The table is representative of a series which will have varying numbers of rows and columns.

In phpMyAdmin, I see the 2d array I would like to see eventually on my web page, when I select the SQL tab and enter
SELECT * FROM `65chain` WHERE Drop_1 is not null

Great. I am now creating my script.

So far I have:

View Replies !
Full HTML Pages In MySQL Page?
I'm working on a small script to put full html pages in a database and then retreive the data to show on the page. The problem is that VARCHAR can only go up to 255 characters I believe. I also tried TEXT, but then I get a few columns like 'Field','Type','Function','Null' and 'Value'.

I don't know what to do with the other columns. I also can't seem to be able to put data in the table with a script.

Can anyone tell me what the best way is to do this and how to insert data into it with PHP? And are there any problems when I try to display it on the page (I read somewhere that special characters are being left out sometimes).

View Replies !
Searching In Mysql
Say in my database I've got a table with structure of

time, long, lat

Time is in the timestamp. I want to write some code that allows the user to input in two times, A and B. And the program will output all the data from time A to time B.

The thing is, I can't just get the user to enter the date right? since the database will search for an exact time, down to the seconds..

The only way I can think of getting round this is to read all the times, and put them into two drop down lists and the user just choose the from and the end time. Though I don't know how to do this and will have to google stuff..

Any other suggestions?

View Replies !
MySQL Searching
If you have a MySQL table and you only know two of the values for one row (say "Username" and "Password") how can you make a PHP script to tell you the third value on that row (like ID).

View Replies !
Searching Mysql
I just dont understand how i can take: PHP Code:

$lastmonth = mktime(0, 0, 0, date("m"), date("d")-3,  date("Y"));

and turn it into #threedaysago PHP Code:

$threedaysago = 20051128224433;
//if the current time were this.
$currenttime = 20051201224433;
// $currenttime is how my dates are stored in mysql.

View Replies !
Searching MySQL DB
Here are 4 entries in a database all under the column "name":

Shock
Barbed Shocker
Shockwave
Sudden Shock

I were to have a textbox to set search stipulations, what would my query string look like to get all of these entries to show up if I simply typed "Shock" in the textbox?  Basically, how do I get PHP/mySQl to search for something in a field, even if it isn't exact, but just contains those letters somewhere? Also, how would I make it limited to matching exactly how it is typed in the textbox (just the letters, not case-sensitive).  So if "Shock" is typed in the textbox, only the "Shock" entry would be returned.

View Replies !
MySQL Searching Not Using LIKE
I have a search function on a mysql table. The LIKE operator is letting me down though. For example, if someone puts in Blue Jacket into the search box they will get the row containing Blue Jacket in the results.

However, I ALSO want them to get the same result (possibly more) if they wrote Jacket Blue or Blue or Jacket. I know this is possible but it is way too complicated for me. Here is the line from my code:

$query = "select a.itemname,a.shortdescription,a.longdescription2,a.longdescription1,a.image1_small,a.price,a.productid,a.category from products a,category b where a.itemname like '%$searchtext%' or a.shortdescription like '%$searchtext%' or a.longdescription2 like '%$searchtext%' or a.longdescription1 like '%$searchtext%' and a.category = b.catid group by a.productid order by a.price,a.itemname";

View Replies !
Searching Several Columns In MYSQL
I wonder if anyone can point me in the right direction on this, I am trying to search multiple columns on a single database and display the info.

I have this set up but it only queries one.

$query_rsSearch = sprintf("SELECT * FROM database WHERE column1 LIKE '%%%s%%'", $colname_rsSearch);

The above works fine for one column but I am having difficulty making it search more than one, I have been trying this method.

$query_rsSearch = sprintf("SELECT * FROM database WHERE column1,column2 LIKE '%%%s%%'", $colname_rsSearch);

But continually get error messages?

View Replies !
Searching A Table In Mysql
I've searched through these forums about searching and didnt really find anything. All the questions that were asked were unanswered. I searched google and came up with this: http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html

except I am not sure if thats what I should be using nor do I understand how to write a query using that. Ill just be searching 1 field in 1 table. Can somone help me with an example query string ? Also I set the field as TEXT since I will just be adding keywords separated by commas into them. Should it be something else?

View Replies !
Loose Mysql Searching
i want to figure out how to search my database loosely so if someone misspells a part of a name they are searching for it will still find similar results. kinda like how when you misspell something on Google and it says "Did you mean ? how would i go about doing this?

View Replies !
Searching MySQL DB Contents
I'm implementing a simple internal search for a site that will select articles containing specified words from a database. However, I am finding LIKE to be somewhat limiting. eg. SELECT title FROM articles WHERE content LIKE '%test%' - this returns all articles containing words test, testing, testosterone etc. Not what is required. eg.

SELECT title FROM articles WHERE content LIKE '% test %'
- this returns only articles containing the word test.

However, the latter will not pick up on the word 'test' at the very start or very beginning of the field, or when immediately prefixed or suffixed by some punctuation.

I've found that using SELECT ..blah .. LIKE '%[^a-z]test[^a-z]%'

should overcome the problem of having punctuation on either side of the search term. 've had no success with this however, and it still doesn't get around the problem of the word occuring at the start or end of a field. Does anyone have any suggestions or experience in searching for words in a DB in such a way?

View Replies !
Searching For PHP/MySQL Tutorials
If anyone knows of a site or book that would help me reach my goal of writing my own CMS, information on these would be much appreciated. As of right now though, I'm pretty new to php altogether. I can manage a little bit on my own, and I'm used to coding (thanks to two years in java courses), so it shouldn't be too hard for me to understand.

View Replies !
Searching MySql Table Using 2+ WHERE's
I want to search a big mysql table with a query something like this. However I dunno if 'WHERE a=1, WHERE b=2' would work, so I'm asking if it will and if it doesn't is there another query that would return what I'm looking for? Query:

SELECT * FROM mytable WHERE row=1, WHERE row=3 LIKE '%my_seach_string%'

View Replies !
Searching Mysql Database
Database name = files
table name = applications

In the table I have the following

ID
appname
descr

I want the people to beable to put an app name in and have the vaules show up in a table.

Or if someone could show me a link to a site that shows you how to do this that would be cool too.

View Replies !
Mysql -> Searching Age Between Two Numbers
how to search mysql for results between two ages? this question isn't clear? ok, check out this sql. Code:

View Replies !
And MySQL - Searching A Database
i am having problems while searching for members on my website.. i have a form that users fill in before being able to click on a 'search' button.. Code:

View Replies !
Searching For Multiple Words In Mysql
I've got a table containing three columns:

Region (these are 8 predetermined values)
Club Name (an open text field which always contains more than one word)
url (contains a url)

On my search page I have two fields that can be used. The first is a drop down box with the regions in, and the other is an open text field searching the clubname field.

I would like to be able to search the table by either:

1. selecting the region on it's own (this works at the moment!!)
2. selecting a region and either one or more keywords (this works if the keyword is the first word in the clubname field in the database)
3. leaving the region blank (on the null value) and entering one or more keywords;

This is the current code:

<?php
mysql_connect (localhost, username, password);
mysql_select_db (swimclub_db);
if ($region == "")
{$region = '%'}
if ($club_name == "")
{$club_name = '%'}
$result = mysql_query ("SELECT * FROM clubs
WHERE region LIKE '$region%'
AND club_name LIKE '$club_name%'
");

if ($row = mysql_fetch_array($result)) {
do {
print $row["region"];
print (" ");
print $row["club_name"];
print (" ");
print $row["url"];
print ("<p>");
} while($row = mysql_fetch_array($result));
} else {print "Sorry, no records were found!";}
?>

Also, if I want the results to appear within my site template (particularly within a certain table) can I add the php code within the opened table and close the table at the end of the php?

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved