sql,SELECT a.column1, b.column2,FROM table1 a,JOIN table2 b ON a.id = b.id;,
``sql,SELECT a.column1, b.column2,FROM table1 a,JOIN table2 b ON a.id = b.id;,
``php,$sql = "SELECT a.*, b.* FROM table1 a JOIN table2 b ON a.id = b.a_id";,$result = $conn>query($sql);,
``,,这段代码将table1和table2通过a.id和b.a_id进行连接,并选择所有字段。Powered By Z-BlogPHP 1.7.3
Copyright Your WebSite.Some Rights Reserved.