mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Update User Guide
This commit is contained in:
parent
44f9368b3f
commit
1663079c28
@ -609,7 +609,7 @@ you may add them directly in forge:</p>
|
||||
<span class="c1">// gives CONSTRAINT `TABLENAME_users_id_foreign` FOREIGN KEY(`users_id`, `users_name`) REFERENCES `users`(`id`, `name`)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>You can specify the desired action for the “on update” and “on update” properties of the constraint as well as the name:</p>
|
||||
<p>You can specify the desired action for the “on update” and “on delete” properties of the constraint as well as the name:</p>
|
||||
<div class="highlight-html+php notranslate"><div class="highlight"><pre><span></span><span class="o"><?</span><span class="nx">php</span>
|
||||
|
||||
<span class="nv">$forge</span><span class="o">-></span><span class="na">addForeignKey</span><span class="p">(</span><span class="s1">'users_id'</span><span class="p">,</span> <span class="s1">'users'</span><span class="p">,</span> <span class="s1">'id'</span><span class="p">,</span> <span class="s1">'CASCADE'</span><span class="p">,</span> <span class="s1">'CASCADE'</span><span class="p">,</span> <span class="s1">'my_fk_name'</span><span class="p">);</span>
|
||||
|
Loading…
x
Reference in New Issue
Block a user