Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2003

    Unanswered: please... how to improve this code?

    i am using the attached php code to query a database and i need to run 3 to 4 queries in the same page which makes it slow..

    how can improve it?

    is it possible to have all three queries in one query?
    Attached Files Attached Files

  2. #2
    Join Date
    Apr 2006
    Denver, Co. USA
    From a PHP standpoint, your first and last query are very similar. You could combine them and make a single query, then use PHP code to test and output the results where you want them.

    However, it is more likely that this is slow due to usage (or lack) of keys in the tables. Since this is PostgreSQL, you can probably get more specific help if you post in that forum -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts