自由职业者: nicolastsue
分享:
举报作品

Hierarchical Procedure Call PHP

Hi there, i made a demo, first function will fetch data from database, and then the second one will add the @param3 as another row then return the new rows array. the full code is here, and also, you can download it from drive. here is the link: https://drive.google.com/open?id=0B2wCjF-lIcvpNWpKU1dCcHRpUWM

%contest_contestName_sub_1%的参赛作品#%entry_number_sub_2%

公共说明面板

  • nicolastsue
    nicolastsue
    • 6 年 之前

    idon't know if this will be accepted, but you can use the view

    • 6 年 之前
    1. nicolastsue
      nicolastsue
      • 6 年 之前

      $sql1= " CREATE VIEW shipsumarry AS SELECT * FROM stab1 WHERE a=$param1 AND b=$param2";
      $sql2= "SELECT * FROM shipsummary";

      // Here, you need to execute $sql1 before $sql2 is useful.
      $db->QueryArray($sql1);
      // Now execute $sql2
      $db->QueryArray($sql2);

      • 6 年 之前
  • nicolastsue
    nicolastsue
    • 6 年 之前

    then you are looking for the PL-SQL, or SP-SQL, you have to rewrite the contest, so everyone will understand it well

    • 6 年 之前
  • collonmade
    竞赛主办者
    • 6 年 之前

    I think you didn't get concept right . We want 2 procedures . One procedure calls another . And php code will only call first procedure so this is nested procedure call . In you solution i can't see any procedure .

    • 6 年 之前