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.
好的,所以我似乎无法让它工作,但这是我不想做的。我有两张这样的桌子
Table1 ---------- Row1
和这个
Table2 ---------- Row2
我想从 Table1 中获取数据,其中 Row2 等于“thisvalue”,在 php 中。知道我应该怎么做吗?谢谢。
你把桌子连在一起
SELECT table1.* FROM table1 t1 JOIN table2 t2 ON t1.row1 = t2.row2
如果您只想要具有特定 rw2 值的行,则可以在 WHERE 子句中指定
SELECT table1.* FROM table1 t1 JOIN table2 t2 ON t1.row1 = t2.row2 where t2.row='your value'