Adam,

The reason you don't find any info on it is because, while not technically
impossible, it is a very bad idea.

If all the tables are not of like structure then are you intending to search
through every field in every table?

if so, yes, you could do it in PHP.

Query for the list of tables.
Loop through the list of tables.
  Query for the fields for a given table.
  Dynamically build a SELECT statement that queries each field for the value
you are looking for.
  execute the statement
  store the results
loop while !(info=found)

You should be able to optimize it to run in days not weeks.  :)

Sorry but if you have a question that your current database cannot answer,
you need to re-think your schema.  Databases are not good at answering the
question "Now were the heck did I put that piece of information?". They are
much better are giving answers to structured questions like "Give me a list
of all the widgets in the database whose color is red."

You can certainly continue down this road...but you have been warned. :)

Here's wishing you success.
Cal
http://www.calevans.com


-----Original Message-----
From: Adam Crawford [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 09, 2001 6:25 AM
To: Cal Evans; [EMAIL PROTECTED]
Subject: Re: searching ALL tables


no, they do not have the same structure,
someone said something about creating a loop using php

since idealy this will end up being a web published database
this sounds good to me, just i have no idea how i would do that

*claims being new to sql & php*
I've scanned thru both of the manuals (mysql & php)
havent seen anything about this yet, think its time for a closer look.

Any other help welcome,
Thank you,
Adam Crawford

----- Original Message -----
From: "Cal Evans" <[EMAIL PROTECTED]>
To: "Adam Crawford" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, March 09, 2001 10:52 PM
Subject: RE: searching ALL tables


You can't.  SQL wasn't designed to do that.

Do all your tables have the same structure?

Cal
http://www.calevans.com


-----Original Message-----
From: Adam Crawford [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 09, 2001 1:53 AM
To: [EMAIL PROTECTED]
Subject: searching ALL tables


Hi all,
I just want to know how to search all tables
I can work out how to search one table, or a few of them at a time
but since we have 1000+ tables, I figure there must be an easyer way
I have tried using % & * instead of the table name, but with no luck

Hope someone can help
Thank you in advance.

Regards,
Adam Crawford

ps, please be sure to cc me a copy of any replys, as i am not subscribed to
the list.


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to