|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Master Mysql Db
Hey Everyone,
Does any one know where the master db for mysql is, and if it has meta data. I need to know this because I am building a search engine based off what google does. Any help would be great.
__________________
Nothing is Everything
|
|
#2
|
||||
|
||||
|
What do you mean?
Mysql's data files are in the data folder within your mysql directory... but I assume they're encoded somehow for security reasons... perhaps you could explain more? |
|
#3
|
|||
|
|||
|
how do i join two databases together in a query to search for article_ids? Just the basic query structure would help me. Thanks
|
|
#4
|
||||
|
||||
|
Try this method... I've used it once before on SQLServer, but i'm guessing it's a standard. The method is similar in notation to table.fieldname - you just add the db name in front, and use 2 dots
Code:
SELECT articleid FROM articleDB..articles INNER JOIN someotherDB..someothertable WHERE someotherDB..someothertable.keywords like '%foo%' |
|
#5
|
|||
|
|||
|
I'm not sure if the two dots (..) would pose a problem in MySQL (I think they would), so just replace them with single quotes... Stumpy's code is bang on.
There's a great tutorial over on Dev Shed that will clear up JOIN issues for you: Understanding SQL Joins |
|
#6
|
||||
|
||||
|
You can do cross-database joins in mysql 4, but I'm not sure of the syntax. It's probably dbname.tablename.fieldname. Check mysql.com to verify.
|
|
#7
|
|||
|
|||
|
Thanks for everything you guys have been posting so far, but this is far from over. I got it querying both db's now and matching up article_id's. The challenge is now is removing duplicates.
I am creating search method that is a bit different than the norm, i think google does it this way. Basically each table represents a keyword and in that table is an article_id that has that keyword found. Right now i have two tables and in there the word mysql appers. So i would naturally get the same id into my result set twice. Now i have tried the distinct function but that does not seem to work real great. What about a union statement? |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > Master Mysql Db |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|