Announcement

Collapse
No announcement yet.

Using PHP and SQL Select statements to create static HTML pages?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Using PHP and SQL Select statements to create static HTML pages?

    Hi - can I use PHP code to generate static html pages using SQL select statements within v8?

    What I want to do is to have a piece of PHP code on my front page that runs a Select statement to retrieve 3 random products from the Actinic.mdb on my PC which is then uploaded as static HTML pages.
    Regards
    David

    #2
    There was a post recently on this, might be helpful:-

    http://community.actinic.com/showthr...ght=random+php

    Dave
    Cheers

    David
    Located in Edinburgh UK

    http://twitter.com/mcfinster

    Comment


      #3
      Hi Dave - thanks for the reply. Had a look and interesting stuff.

      I actually asked a simplified question of what I want to do.

      If my original question was possible I then wanted to expand it so that it chose the products based on other criteria - e.g. choose products which have a Customvar of Christmas with a price less than £10.00.
      Regards
      David

      Comment


        #4
        Hi - does anyone know if V8 can do this?
        Regards
        David

        Comment


          #5
          Maybe - if you use the 'Best Sellers' or 'New Products' list on the front page of the store, you could set up the list so that it always shows all products. Then you could put a conditional statement into the list code to only show products that meet certain criterea.

          Comment


            #6
            So how would you get your actinic homepage to run these php snippets? Is there a way of telling "index.html" to be named "index.php"?

            Comment


              #7
              Justin,

              There are two ways of running PHP code in Actinic V8.

              1) It runs on your server and processes pages ending (usually) in .php. This is the way most people expect PHP to run. This code can access whatever files are available on the server.

              2) The entire PHP language is embedded into the Catalog.exe application and is available at page creation time (Web / Update or Web / Refresh) to do processing in addition to whatever Actinic does. Your PHP code is embedded in your Layouts. A simple example would be a snippet of PHP that compares the product price with a Variable containing an RRP, calculates and displays a discount. This result is echo'd out to the generated page and becomes part of that page's static HTML. The generated pages can be plain .html ones as the work is done in Actinic.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                Thanks Norman, thats brilliant to know - is it the same in any way in v7?

                Comment


                  #9
                  No. V7 has no embedded PHP in the Catalog application. Only standard server-side PHP (as (1) above) can be used.
                  Norman - www.drillpine.biz
                  Edinburgh, U K / Bitez, Turkey

                  Comment

                  Working...
                  X