⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sdo.das.rel.examples.three-table.html

📁 php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容
💻 HTML
📖 第 1 页 / 共 2 页
字号:
    </p></div>    <div class="example-contents"><div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">require_once&nbsp;</span><span style="color: #DD0000">'SDO/DAS/Relational.php'</span><span style="color: #007700">;<br />require_once&nbsp;</span><span style="color: #DD0000">'company_metadata.inc.php'</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">/*************************************************************************************<br />*&nbsp;Empty&nbsp;out&nbsp;the&nbsp;three&nbsp;tables<br />*************************************************************************************/<br /></span><span style="color: #0000BB">$dbh&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">PDO</span><span style="color: #007700">(</span><span style="color: #0000BB">PDO_DSN</span><span style="color: #007700">,</span><span style="color: #0000BB">DATABASE_USER</span><span style="color: #007700">,</span><span style="color: #0000BB">DATABASE_PASSWORD</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$pdo_stmt&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$dbh</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">prepare</span><span style="color: #007700">(</span><span style="color: #DD0000">'DELETE&nbsp;FROM&nbsp;COMPANY;'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$rows_affected&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$pdo_stmt</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">execute</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">$pdo_stmt&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$dbh</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">prepare</span><span style="color: #007700">(</span><span style="color: #DD0000">'DELETE&nbsp;FROM&nbsp;DEPARTMENT;'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$rows_affected&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$pdo_stmt</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">execute</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">$pdo_stmt&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$dbh</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">prepare</span><span style="color: #007700">(</span><span style="color: #DD0000">'DELETE&nbsp;FROM&nbsp;EMPLOYEE;'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$rows_affected&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$pdo_stmt</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">execute</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">/*************************************************************************************<br />*&nbsp;Create&nbsp;a&nbsp;tiny&nbsp;but&nbsp;complete&nbsp;company.<br />*&nbsp;The&nbsp;company&nbsp;name&nbsp;is&nbsp;Acme.<br />*&nbsp;There&nbsp;is&nbsp;one&nbsp;department,&nbsp;Shoe.<br />*&nbsp;There&nbsp;is&nbsp;one&nbsp;employee,&nbsp;Sue.<br />*&nbsp;The&nbsp;employee&nbsp;of&nbsp;the&nbsp;month&nbsp;is&nbsp;Sue.<br />*************************************************************************************/<br /></span><span style="color: #0000BB">$das&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">SDO_DAS_Relational&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">$database_metadata</span><span style="color: #007700">,</span><span style="color: #DD0000">'company'</span><span style="color: #007700">,</span><span style="color: #0000BB">$SDO_containment_metadata</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$dbh&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">PDO</span><span style="color: #007700">(</span><span style="color: #0000BB">PDO_DSN</span><span style="color: #007700">,</span><span style="color: #0000BB">DATABASE_USER</span><span style="color: #007700">,</span><span style="color: #0000BB">DATABASE_PASSWORD</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$das&nbsp;&nbsp;</span><span style="color: #007700">-&gt;&nbsp;</span><span style="color: #0000BB">createRootDataObject</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">$acme&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$root&nbsp;</span><span style="color: #007700">-&gt;&nbsp;</span><span style="color: #0000BB">createDataObject</span><span style="color: #007700">(</span><span style="color: #DD0000">'company'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$acme&nbsp;</span><span style="color: #007700">-&gt;&nbsp;</span><span style="color: #0000BB">name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"Acme"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$shoe&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$acme&nbsp;</span><span style="color: #007700">-&gt;&nbsp;</span><span style="color: #0000BB">createDataObject</span><span style="color: #007700">(</span><span style="color: #DD0000">'department'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$shoe&nbsp;</span><span style="color: #007700">-&gt;&nbsp;</span><span style="color: #0000BB">name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'Shoe'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$shoe&nbsp;</span><span style="color: #007700">-&gt;&nbsp;</span><span style="color: #0000BB">location&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'A-block'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$sue&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$shoe&nbsp;</span><span style="color: #007700">-&gt;&nbsp;</span><span style="color: #0000BB">createDataObject</span><span style="color: #007700">(</span><span style="color: #DD0000">'employee'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$sue&nbsp;</span><span style="color: #007700">-&gt;&nbsp;</span><span style="color: #0000BB">name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'Sue'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$acme&nbsp;</span><span style="color: #007700">-&gt;&nbsp;</span><span style="color: #0000BB">employee_of_the_month&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$sue</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$das&nbsp;</span><span style="color: #007700">-&gt;&nbsp;</span><span style="color: #0000BB">applyChanges</span><span style="color: #007700">(</span><span style="color: #0000BB">$dbh</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$root</span><span style="color: #007700">);<br /><br />echo&nbsp;</span><span style="color: #DD0000">"Wrote&nbsp;back&nbsp;Acme&nbsp;with&nbsp;one&nbsp;department&nbsp;and&nbsp;one&nbsp;employee\n"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>    </div>   </div>  </p>  <p class="para">   <div class="example">    <p><b>Example #2 One company, one department, one employee - Retrieve and update</b></p>    <div class="example-contents"><p>     The SQL statement passed to the Relational DAS is this time an inner      join that retrieves data from all three tables. Otherwise this example      introduces nothing that has not appeared in a previous example.     </p></div>    <div class="example-contents"><p>     The graph is updated by the addition of a new department and employee      and some alterations to the name properties of the existing objects      in the graph. The combined changes are then written back. The      Relational DAS will process and apply an arbitrary mixture of      additions, modifications and deletions to and from the data graph.    </p></div>    <div class="example-contents"><div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">require_once&nbsp;</span><span style="color: #DD0000">'SDO/DAS/Relational.php'</span><span style="color: #007700">;<br />require_once&nbsp;</span><span style="color: #DD0000">'company_metadata.inc.php'</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">/*************************************************************************************<br />*&nbsp;Find&nbsp;the&nbsp;company&nbsp;again&nbsp;and&nbsp;change&nbsp;various&nbsp;aspects.<br />*&nbsp;Change&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;company,&nbsp;department&nbsp;and&nbsp;employee.<br />*&nbsp;Add&nbsp;a&nbsp;second&nbsp;department&nbsp;and&nbsp;a&nbsp;new&nbsp;employee.<br />*&nbsp;Change&nbsp;the&nbsp;employee&nbsp;of&nbsp;the&nbsp;month.<br />*************************************************************************************/<br /></span><span style="color: #0000BB">$das&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">SDO_DAS_Relational&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">$database_metadata</span><span style="color: #007700">,</span><span style="color: #DD0000">'company'</span><span style="color: #007700">,</span><span style="color: #0000BB">$SDO_containment_metadata</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$dbh&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">PDO</span><span style="color: #007700">(</span><span style="color: #0000BB">PDO_DSN</span><span style="color: #007700">,</span><span style="color: #0000BB">DATABASE_USER</span><span style="color: #007700">,</span><span style="color: #0000BB">DATABASE_PASSWORD</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$root&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$das</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">executeQuery</span><span style="color: #007700">(</span><span style="color: #0000BB">$dbh</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #DD0000">"select&nbsp;c.id,&nbsp;c.name,&nbsp;c.employee_of_the_month,&nbsp;d.id,&nbsp;d.name,&nbsp;e.id,&nbsp;e.name&nbsp;"&nbsp;</span><span style="color: #007700">.<br />&nbsp;&nbsp;</span><span style="color: #DD0000">"from&nbsp;company&nbsp;c,&nbsp;department&nbsp;d,&nbsp;employee&nbsp;e&nbsp;"&nbsp;</span><span style="color: #007700">.<br />&nbsp;&nbsp;</span><span style="color: #DD0000">"where&nbsp;e.dept_id&nbsp;=&nbsp;d.id&nbsp;and&nbsp;d.co_id&nbsp;=&nbsp;c.id&nbsp;and&nbsp;c.name='Acme'"</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;array(</span><span style="color: #DD0000">'company.id'</span><span style="color: #007700">,</span><span style="color: #DD0000">'company.name'</span><span style="color: #007700">,</span><span style="color: #DD0000">'company.employee_of_the_month'</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'department.id'</span><span style="color: #007700">,</span><span style="color: #DD0000">'department.name'</span><span style="color: #007700">,</span><span style="color: #DD0000">'employee.id'</span><span style="color: #007700">,</span><span style="color: #DD0000">'employee.name'</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">$acme&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$root</span><span style="color: #007700">[</span><span style="color: #DD0000">'company'</span><span style="color: #007700">][</span><span style="color: #0000BB">0</span><span style="color: #007700">];<br /><br /></span><span style="color: #0000BB">$shoe&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$acme</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">department</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">];<br /></span><span style="color: #0000BB">$sue&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$shoe&nbsp;</span><span style="color: #007700">-&gt;&nbsp;</span><span style="color: #0000BB">employee</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">];<br /><br /></span><span style="color: #0000BB">$it&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$acme</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">createDataObject</span><span style="color: #007700">(</span><span style="color: #DD0000">'department'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$it</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'IT'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$it</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">location&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'G-block'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$billy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$it</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">createDataObject</span><span style="color: #007700">(</span><span style="color: #DD0000">'employee'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$billy</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">name&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'Billy'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$acme</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">name&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'MegaCorp'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$shoe</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">name&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'Footwear'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$sue</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">name&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'Susan'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$acme</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">employee_of_the_month&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$billy</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$das&nbsp;</span><span style="color: #007700">-&gt;&nbsp;</span><span style="color: #0000BB">applyChanges</span><span style="color: #007700">(</span><span style="color: #0000BB">$dbh</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$root</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #DD0000">"Wrote&nbsp;back&nbsp;company&nbsp;with&nbsp;extra&nbsp;department&nbsp;and&nbsp;employee&nbsp;and&nbsp;all&nbsp;the&nbsp;names&nbsp;changed&nbsp;(Megacorp/Footwear/Susan)\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>    </div>   </div>  </p>  <p class="para">   <div class="example">    <p><b>Example #3 One company, two departments, two employees - Retrieve and delete</b></p>    <div class="example-contents"><p>     The company is retrieved as a complete data graph containing five      data objects - the company, two departments and two employees.     They are all deleted by deleting the company object. Deleting an      object from the graph deletes all the object beneath it in the graph.     Five SQL DELETE statements will be generated and  executed. As always      they will be qualified with a WHERE clause that contains all of the      fields that were retrieved, so that any updates to the data in the      database in the meantime by another process will be detected.    </p></div>    <div class="example-contents"><div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">require_once&nbsp;</span><span style="color: #DD0000">'SDO/DAS/Relational.php'</span><span style="color: #007700">;<br />require_once&nbsp;</span><span style="color: #DD0000">'company_metadata.inc.php'</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">/*************************************************************************************<br />*&nbsp;Now&nbsp;read&nbsp;it&nbsp;one&nbsp;more&nbsp;time&nbsp;and&nbsp;delete&nbsp;it.<br />*&nbsp;You&nbsp;can&nbsp;delete&nbsp;part,&nbsp;apply&nbsp;the&nbsp;changes,&nbsp;then&nbsp;carry&nbsp;on&nbsp;working&nbsp;with&nbsp;the&nbsp;same&nbsp;graph&nbsp;but<br />*&nbsp;care&nbsp;is&nbsp;needed&nbsp;to&nbsp;keep&nbsp;closure&nbsp;-&nbsp;you&nbsp;cannot&nbsp;delete&nbsp;the&nbsp;employee&nbsp;who&nbsp;is&nbsp;eotm&nbsp;without<br />*&nbsp;reassigning.&nbsp;For&nbsp;safety&nbsp;here&nbsp;we&nbsp;delete&nbsp;the&nbsp;company&nbsp;all&nbsp;in&nbsp;one&nbsp;go.&nbsp;<br />*************************************************************************************/<br /></span><span style="color: #0000BB">$das&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">SDO_DAS_Relational&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">$database_metadata</span><span style="color: #007700">,</span><span style="color: #DD0000">'company'</span><span style="color: #007700">,</span><span style="color: #0000BB">$SDO_containment_metadata</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$dbh&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">PDO</span><span style="color: #007700">(</span><span style="color: #0000BB">PDO_DSN</span><span style="color: #007700">,</span><span style="color: #0000BB">DATABASE_USER</span><span style="color: #007700">,</span><span style="color: #0000BB">DATABASE_PASSWORD</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$root&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$das</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">executeQuery</span><span style="color: #007700">(</span><span style="color: #0000BB">$dbh</span><span style="color: #007700">,<br />&nbsp;&nbsp;</span><span style="color: #DD0000">"select&nbsp;c.id,&nbsp;c.name,&nbsp;c.employee_of_the_month,&nbsp;d.id,&nbsp;d.name,&nbsp;e.id,&nbsp;e.name&nbsp;"&nbsp;</span><span style="color: #007700">.<br />&nbsp;&nbsp;</span><span style="color: #DD0000">"from&nbsp;company&nbsp;c,&nbsp;department&nbsp;d,&nbsp;employee&nbsp;e&nbsp;"&nbsp;</span><span style="color: #007700">.<br />&nbsp;&nbsp;</span><span style="color: #DD0000">"where&nbsp;e.dept_id&nbsp;=&nbsp;d.id&nbsp;and&nbsp;d.co_id&nbsp;=&nbsp;c.id&nbsp;and&nbsp;c.name='MegaCorp';"</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;array(</span><span style="color: #DD0000">'company.id'</span><span style="color: #007700">,</span><span style="color: #DD0000">'company.name'</span><span style="color: #007700">,</span><span style="color: #DD0000">'company.employee_of_the_month'</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'department.id'</span><span style="color: #007700">,</span><span style="color: #DD0000">'department.name'</span><span style="color: #007700">,</span><span style="color: #DD0000">'employee.id'</span><span style="color: #007700">,</span><span style="color: #DD0000">'employee.name'</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">$megacorp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$root</span><span style="color: #007700">[</span><span style="color: #DD0000">'company'</span><span style="color: #007700">][</span><span style="color: #0000BB">0</span><span style="color: #007700">];<br /><br />unset(</span><span style="color: #0000BB">$root</span><span style="color: #007700">[</span><span style="color: #DD0000">'company'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB">$das&nbsp;</span><span style="color: #007700">-&gt;&nbsp;</span><span style="color: #0000BB">applyChanges</span><span style="color: #007700">(</span><span style="color: #0000BB">$dbh</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$root</span><span style="color: #007700">);<br /><br />echo&nbsp;</span><span style="color: #DD0000">"Deleted&nbsp;the&nbsp;company,&nbsp;departments&nbsp;and&nbsp;employees&nbsp;all&nbsp;in&nbsp;one&nbsp;go.\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>    </div>   </div>  </p> </div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="sdo.das.rel.examples.html">Examples</a></div> <div class="next" style="text-align: right; float: right;"><a href="sdo.das.rel.limitations.html">Limitations</a></div> <div class="up"><a href="sdo.das.rel.examples.html">Examples</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -