This topic is locked

General questions

2/20/2008 12:45:33 AM
PHPRunner General questions
J
JasonTranter author

I am evaluating PHPRunner. I have two basic questions.
I have two tables in my database that relate to student receords. I would like to create an app that allows me to view one page/table with information from both tables (i.e. with INNER JOIN) but that also allows edit/inline edit. Is that allowed? I tried it, and left the ID fields in the SQL command, but it did not seem to work.
I will have hundreds of users in my database (students). I would like to add a few drop-down boxes so I can quickly find the information I need (a list of instructors, courses, and year). Is that possible?
Thaks for your help.

J
Jane 2/20/2008

Jason,
please see my ansers below:

  1. you can't edit two or more tables on the one page.

    As workaround you can join two tables, update second table in the Before record updated event on the Events tab and remove fields of the second table from general update query.

    Here is a sample code:
    global $conn;

    $strUpdate = "update table2 set field1=".$values["field1"].",field2='".$values["field2"]."' where recordID=".$values["RecordID"];

    db_exec($strUpdate,$conn);
    unset($values["field1"]);

    unset($values["field2"]);


2. to setup field as dropdown select Lookup wizard on the "Edit as" settings dialog on the Visual Editor tab.