You're running 3 entirely independent scripts, so they can't share a connection.
You may save an infinitessimal amount of time by using mysql_pconnect() instead of mysql_connect(), which will give each process/thread a permanent database connection, so it doesn't have to connect every time. Adam Hooper [EMAIL PROTECTED] On Fri, 31 May 2002 09:55:27 +0100 "Caspar Kennerdale" <[EMAIL PROTECTED]> wrote: > 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? > > > > > > --------------------------------------------------------------------- > 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