You are here: Beginners question re querying multiple tables « All PHP « IT news, forums, messages
Beginners question re querying multiple tables

Posted by Ian on 05/23/05 05:50

I have a number of very simple MySQL tables with identical structure as
follows:


White's Trade directory for Sheffield, 1862
SURNAME
FORENAME
ABODE
OCCUPATION

Pigot's Trade directory for Rotherham, 1828-9
SURNAME
FORENAME
ABODE
OCCUPATION

etc etc


What I need to be able to do is to allow the user to enter any of the
table fields and query ALL the tables at once. What would be the best
way to do this using PHP? Or, would I be better advised to have the
data all in one table and add the additional field of DIRECTORY and YEAR
to the one big table? The trouble with doing that is that a lot of the
data would be redundant especially as the directory names tend to be
quite long. I suppose I could use a token to represent them instead.
Anyway, would appreciate any advice from those with experience of this
kind of thing.

Thanks in advance.

Ian











So, what I was wondering is would it be better to put them all in the
same table and add the fields DIRECTORY and YEAR. The only problem I can
see with that is that the name and year of the directory will occupy as
much space as the other 4 fields put together so seems like it will
waste a lot of space, unless I use a token to represent the directory
name. Basically, as a beginner, would appreciate any advice from those
with more experience of this kind of thing.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация