1 page 2 tables

  • buzzby365
  • Proficient
  • Proficient
  • buzzby365
  • Posts: 288

Post 3+ Months Ago

is it possible for one html page to have 2 php scripts for different sql tables. eg. can you have a html table that will have database data passed to it and then at the bottom of the page have php pagination which is also linked to a different table/database.

basically: a html table containing dynamic (database pulled) data from an sql table called maininfo and a pagination script also using a
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Carnix
  • Guru
  • Guru
  • User avatar
  • Posts: 1098

Post 3+ Months Ago

Sure it is, consider though that opening and closing connections is pretty intensive, so if you have a high-volume site you might not want to do that. Depending on your database, you could pull the date you need from both tables at the same time using nested SQL calls. This would save you the trouble of opening multiple connections, though I don't think mySQL can do that (Oracle can).

In generaly, you can do the following:

Open Connection
Do something
Close Connection

Open Connection
Do other thing
Close Connection

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 100 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.