Searching MySQL Database Using PHP form

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply

Do you like my "Avatar"?

its awesome!
0
No votes
its good.
2
50%
its ok.
1
25%
could be better.
1
25%
i hate it!
0
No votes
 
Total votes: 4

User avatar
brianw84
Forum Newbie
Posts: 18
Joined: Fri Nov 15, 2002 9:01 pm
Location: Jax|Fla

Searching MySQL Database Using PHP form

Post by brianw84 »

hello its me again (i posted the topic below this one) now that i got my record insert to work (thanks again by the way) i need to figure out a way to search all 29 collums. i have read the other forum topics on this subject but they all tend to require the user to specify the which colum to search in. I on the other hand am wondering if there is any way to to set up one text feild to search all the colums in the table and desplay the entire row in which the value was found in.
any help would be greatly appreciated.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

take a look at the MySQL FULLTEXT feature
you may include as many fields as you like to the index
User avatar
brianw84
Forum Newbie
Posts: 18
Joined: Fri Nov 15, 2002 9:01 pm
Location: Jax|Fla

Fulltext Feature

Post by brianw84 »

I have looked at that and thought about it, but the problem is that i have allready made the table and it has 29 columns, so i would have to make it all over again to utilize the full text component.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

you should read more carefully ;)
...at CREATE TABLE time or added later with ALTER TABLE or CREATE INDEX. For large datasets, it will be much faster to load your data into a table that has no FULLTEXT index, then create the index with ALTER TABLE (or CREATE INDEX).
User avatar
brianw84
Forum Newbie
Posts: 18
Joined: Fri Nov 15, 2002 9:01 pm
Location: Jax|Fla

I read that..

Post by brianw84 »

I tride that but you can only make 16 columns fulltext, if u try the whole 29 it dosnt work.
* Allso how do you ad a column?
Post Reply