Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
Search whole MySQL table
Old 11-18-2005, 02:11 AM Search whole MySQL table
Skilled Talker

Posts: 58
Trades: 0
Hi,

If I have the following statement....

SELECT * FROM table_name WHERE column_name LIKE '%B747%'

How do I not specify a column name, it must use all available columns?

WHERE * does not seem to work.

Can you please help!??

THANX!!
Llama is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-19-2005, 04:46 PM
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://www.webmaster-forums.net/showthread.php?t=31665
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-21-2005, 09:35 AM
Skilled Talker

Posts: 58
Trades: 0
Hi,

I have followed the link and read through it.

Please excuse my stupidity, but I am really not succeeding in creating or searching with fulltext indexes.

I do not even know if i am setting up the database correctly.

Will you please advise me on how to do this correctly?
Llama is offline
Reply With Quote
View Public Profile
 
Old 11-21-2005, 10:11 AM
madkad's Avatar
madkad-hosting.com

Posts: 310
Location: UK
Trades: 0
The best way for use to know if you have set you database up proply and asvise you on the matter would be to tell us what fields you have done and what you have set them all at also ding this would help people show you what kind of php script you would need to do the job you after
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Great Hosting For You
madkad is offline
Reply With Quote
View Public Profile Visit madkad's homepage!
 
Old 11-23-2005, 08:24 AM
Kyrnt's Avatar
The Post-Mod Years

Posts: 2,536
Location: Western Maryland
Trades: 0
Llama,

Typically you must know what types of data are present in each of your columns. Your WHERE condition (LIKE '%B747%') implies that you are searching on string data only. Certainly you would not want that query to go against a column with integers.

You will need to identify all the columns in your table that you want to search and then create a compound query, such as:

Code:
SELECT * from <table> WHERE
    column1 like '%B747%' OR
    column2 like '%B747%' OR
    column3 like '%B747%' OR
    column4 like '%B747%'
__________________
—Kyrnt
Kyrnt is offline
Reply With Quote
View Public Profile Visit Kyrnt's homepage!
 
Reply     « Reply to Search whole MySQL table
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.24004 seconds with 12 queries