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 的值...而不是所有值..尝试一次