Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
通常の MySQL セットアップから外部プログラムを呼び出すことは可能ですか? (そしてその出力を取得します)
このようなもの:
UPDATE users SET something = CALL('/path/program', 'params') WHERE id = 1;
たとえば、テーブルの値をプログラム パラメータとして使用したいと考えていますusers.name。
users.name
シェルコマンドでクエリを作成し、この方法で実行するのはどうですか?
# build query echo -n "UPDATE users SET something = '" > query.sql echo -n `/path/your_command` >> query.sql echo -n "' WHERE id = 1;" >> query.sql # run it! mysql db_name < query.sql