Re: Am I on the right track here?



Mike Silva escribió:
So I'm trying to understand what's involved in displaying a dynamic
webpage based on data from a database query, e.g. a list of books
based on an author search. This is my understanding of what has to
happen.

1) The query is constructed and passed to the database server, which
returns the results. Let's say it returns 45 records.

2) Regular HTML displays the non-dynamic sections of the results page
(s)

3) PHP code (see, this is a PHP question ;) loops through the records
to
a) set adjusted x,y coordinates for the current record
b) display the specified text from the record - title, description,
ISBN, etc
c) display one or more pictures - would these typically be living
in some giant \image directory, and be accessed by filenames stored in
the record?
d) generate specified buttons, quantity boxes, etc for this record
e) repeat a-d until all records displayed, or max number of records
per page is reached
f) generate navigation links (e.g. First << < 1 2...5 > >> Last)
based on current display page

Comments on my understanding of what's involved?

1) PHP code starts running
2) PHP sends a query to the database server and fetches 45 records
3) PHP generates output, that happens to be HTML
4) HTML is sent to the browser
5) Browser renders HTML, doing all that fancy stuff involving x,y coordinates



--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor al baño María: http://www.demogracia.com
--
.


Quantcast