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 クエリを使用して、データベースからデータを取得するにはどうすればよいですか。
$string = 'WS'; mysql_query("SELECT * FROM `table` WHERE `name` STARTS WITH '$string'");
上記のようなもの
もしかしてLIKE
LIKE
SELECT * FROM `table` WHERE `name` LIKE 'WS%'
最初にwsを持つ値のみをフェッチします...すべての値ではありません..一度試してください