ドロップダウン メニューを使用して、どのアイテムが選択されていても、データベースのテーブルにカスタム メモを追加したいと考えています。
次のように文字列を渡すだけで問題なく動作します。数量オーバーライドが選択されました
if ($this->call_type) sql::query("insert into PWARE.ADS.STACRD (ACCOUNT,ENTRYDATETIME,CATEGORY,NOTE,LOGCODE) VALUES (" . $this->patient->hex .",getdate(),'','QTY OVERRIDE SELECTED'," . login::$hex . ")");
しかし、$tc
変数を使用すると、希望する結果が得られません。
これが私のコードです:
function npc_call_type_status()
{
$tc = "($this->call_type == 'PO' ? 'OK - PENDING PO'
:($this->call_type == 'IN' ? 'OK - PENDING INS'
:($this->call_type == 'PI' ? 'OK - PENDING INS/PO'
:($this->call_type == 'NC' ? 'OK - NO CHANGES'
: ''))))";
if ($this->call_type) sql::query("insert into PWARE.ADS.STACRD (ACCOUNT,ENTRYDATETIME,CATEGORY,NOTE,LOGCODE) VALUES (" . $this->patient->hex .",getdate(),'',".$tc."," . login::$hex . ")");
}
ありとあらゆる助けをいただければ幸いです。ありがとうございました。