モジュール 開発: Difference between revisions

Jump to navigation Jump to search
m
Line 285: Line 285:
See chapter [[Hooks_system#Implement_the_Hook]] to know how to use Dolibarr existing hooks to add/replace code at Dolibarr hooks place.
See chapter [[Hooks_system#Implement_the_Hook]] to know how to use Dolibarr existing hooks to add/replace code at Dolibarr hooks place.


===Database access===
===データベース アクセス===
If you need to edit some data in the database inside your own table, use the PHP class generated before.
自前テーブルの中でデータベースのデータを編集する必要がある場合、前に生成されたPHPクラスを使うこと。


If you to make access to tables with no dedicated PHP class available, this is always possible (for example if you want to get a list of records with a particular join or filter). In this case, this is a code samples to follow:
専用の PHP クラスがないテーブルにアクセスしたい場合 (たとえば、特定の結合やフィルタを使用したレコードの一覧を取得したい場合など) 、これはいつでも可能。この場合に、倣うべきコード例は:


To make an insert, update or delete:
操作が、 insert, update または delete:


<syntaxhighlight lang="PHP">
<syntaxhighlight lang="PHP">
Line 299: Line 299:
</syntaxhighlight>
</syntaxhighlight>


To read:
操作が read:


<syntaxhighlight lang="PHP">
<syntaxhighlight lang="PHP">
56

edits

Navigation menu