Multiple queries
| From: | Caspar Kennerdale | Date: | Fri, 31 May 2002 08:55:27 +0000 |
| Subject: | Multiple queries | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-100061@lists.php.net to get a copy of this message | ||
Sorry If this is the wrong list for this topic, I hope someone can shed some
light onto my problem.
I am building a php/ Mysql web site for a client which is a picture gallery.
The web site has 3 frames (required by the designer so that the whole thing
doesnt refresh all the time).
Frame 1- Navigation
Frame 2- Info on selected artworks and other related projects
Frame 3- The artworks/ jpegs
I have one table, with a name and info about the project and upto 5 urls of
where the jpeg lies.
When a project is selected in the navigation I request the record from the
database, I create an array which contains the location of the jpegs and
then display them in Frame 3.
Now, I then have a piece of javascript which tells frame 2 to update itself.
So I have parsed the record ID to it and it then open a query to the
database and outputs the relevant information about the artworks. Lastly a
third query is also sent to the database to see if there are any other
projects in the gallery by the same artist- and then create a list of
related links.
So I have 3 database queries over two pages.
I'm wondering if there is a more efficient way of doing this?