2 Replies Latest reply on Apr 23, 2010 5:59 AM by pziecina

    php application development


      i am working on a new php application, i have stored classes and functions in separate files and included them in my application.

      my question is about sql queries, should i include them as functions in my func.php file or is it ok to have the queries sitting in the code for application?

      my application is already including files for functions, classes, jquery, css etc. is there a limit to how many i should include? i have read a few of the application development articles on other  sites, but none of them address the actual database queries.

      looking for a "best practices" type of answer here, i am a little new to application development and am just looking for some guidance on setting up a web application


      thanks in advance


        • 1. Re: php application development
          Ned Murphy Adobe Community Professional & MVP

          THis doesn't appear to be a Dreamweaver related posting.  You may get better information if you try posting in the Application Development forum...



          • 2. Re: php application development
            pziecina Level 6



            As said in the previous reply you may get more recommendations regarding 'best practice' in the app development section.


            But unless you are using stored procedures for you database queries, they will be included in your page file anyway if you are using php includes/required statements. Keeping such items in separate files simply cuts down on including repetitive items on different pages, but if you have a large number of queries/functions in the 'include' files that are not used on a page they will still be loaded in the page for possible parsing.


            As a recommendation, unless you are developing a large site requiring a lot of repetitive code reserve the includes for items that are used on many/all pages, otherwise your page load time will suffer.