You are here: Re: my first website with Php and MySql database « PHP SQL « IT news, forums, messages
Re: my first website with Php and MySql database

Posted by strawberry on 10/25/06 10:05

Captain Paralytic wrote:
> pscbrobotspam@googlemail.com wrote:
> > Hi,
> >
> > I have a website in my mind I would to implement once my db is more
> > furnished. For now, it's a small db in a form of Excel tables.
> >
> > Is there a way if I create an access file to export it into my sql with
> > little work?
> >
> > Or should I skip access and start direct into mysql php?
> >
> > You can find a sample of the file there and what the site should be
> > about.
> >
> > http://h1k.spreadsheets.google.com/ccc?id=o09362623063316940048.3845572381750948418.10515899926621056420.2874808982047821897
> >
> > I would appreciate a few advices before I ever get started as I know
> > the basic of my sql but haven't put anything into practice yet.
> >
> > I have downloaded phpmysql but the version of my sql there is all GUI.
> > Some books I have bought teach sql with a terminal window such as dos
> > or unix as far as I know. Is there a way to have that terminal table in
> > phpmysql?
> >
> > Thanks for your help,
> >
> > Pascal
> You should split out the description words into a one to many database
> link.

Actually (and apologies, CP, if this is exactly what you meant), you
should 'split out' the description words to a many-to-many db link, via
a look-up table, especially so as descriptive words can have more than
one meaning, depending upon context:

keywords(keyword_id*,keyword)
idioms(idiom_id*,idiom_en,idiom_fr)
keywords_idioms(keyword_id*,idiom_id*)

* denotes PRIMARY KEY

Example query:

SELECT i.* FROM idioms i
LEFT JOIN keywords_idioms ki ON i.idiom_id = ki.idiom_id
LEFT JOIN keywords k ON k.keyword_id = ki.keyword_id
WHERE k.keyword = 'attitude'

a more complex query would include other, associated keywords, for the
purpose of filtering the results, but I'll leave that as an exercise
for the reader.

PS: I like this table naming style (where 'keyword' belongs to the
table 'keywords', but it can sometimes make life easier later on to
keep everything in the singular! Just thought I'd mention it as it's a
problem I'm running into just now with exchanging data between a MySQL
db and some XML pages.)

 

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

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