This topic is locked

Is modified code retained on subsequent changes?

12/27/2006 2:43:18 AM
PHPRunner General questions
A
APJ author

Hi, Just wondering...

I've been reading the forums and quite a few answers require custom code to be inserted or replace existing code in the generated pages to make the output do something 'special'...

If I was to make a change like this eg: 'Position to near current date in a list' question...

Andreas,
you can do the following:

  1. check off No records on the first page option on the Edit SQl query tab.
  2. build your pages.
  3. open generated ..._list.php file, find these lines:
    QUOTE
    if(!count($_GET) && !count($_POST))

    $strSQL = AddWhere($strSQL,"1=0");
    and replace it with this one:
    QUOTE
    if(!count($_GET) && !count($_POST))

    $strSQL = AddWhere($strSQL,"`FieldName`>now()");
    where FieldName is your actual field name.

    To recieve all records click on the Show all button on the LIST page.
    would PHPRunner respect these changes if I was to later-on open the project and mess around some more in the wizards or would it write back the original list.php file? and mods be lost..?

    Just wondering up front..

    thanks

    AJ

J
Jane 12/27/2006

Hi,
All changes will disappear when you rebuild your pages. So I recommend you to make all changes in the generated files after you complete your project.