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.
私はこのJOINステートメントを持っています
$data = mysql_query("SELECT * FROM table a JOIN db.table2 b ON a.e_id = b.e_id WHERE amount='5' ");
「テーブル」からすべての列を選択しますが、「テーブル」のすべての選択を維持し、結果に「テーブル2」からの2つの列のみを含める必要があります。
"SELECT a.*,b.column1,b.column2 FROM table1 a JOIN table2 b ON a.e_id = b.e_id WHERE amount='5'"
「column1」と「column2」を、取り込む必要があるフィールドに置き換えるだけです