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.
1 つの列から限られた数の文字を選択する必要があります。私はもう試した :
SELECT substring_index(COLUMN_NAME, 250);
ただし、列名は通常のテキスト文字列として識別されます。
例: 「説明」列があり、説明の最初の 250 文字を取得して、php 変数に入れたいと考えています。
substring_NOT substring_index を使用する場合に機能します。
サブストリング関数呼び出しの後に「ASDescription」を追加して、列の名前をPHP結果配列のDescriptionだけに戻す必要がありますか?
ポスターからのより明確な説明とともに、彼/彼女がそれを受け入れることを選択した場合に備えて、ここに答えを入れてください.
substring(description,1,250)