MySQL中多表不关联查询
MySQL中多表不关联查询
多表不关联查询中,需要在结果数组中区分开每张表所查询出来的数据,在每个⼦SELET语句中加⼊固定值再加以判断。
问题解决...
语句:
(SELECT field1 AS a,field11 AS b, '常量1' AS c FROM table1) UNION ALL (SELECT field2 AS a,field22 AS b, '常量2' AS c FROM table2) UNION ALL ... ORDER BY a DESC 结果:
Array
(
[0] => Array
(
[a] => ...
[b] => ...
[c] => '常量1'
)
[1] => Array
(c语言中memset
[a] => ...
[b] => ...
html文档是超文本文档吗[c] => '常量1'
)
[2] => Array
(
mysql语句多表查询[a] => ...
[b] => ...
[c] => '常量2'
)
[3] => Array
(
反函数关于什么对称>区块链交易所源码n0 stacking[a] => ...
[b] => ...
[c] => '常量1'
)
)
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论