我觉得有问题mysql_field_table
我的查询:
SELECT partners.buyer,
calls_nc_sell_daily.market,
partners.name,
calls_nc_sell_daily.partner_id_fk as 'partners_id_fk',
partners.seller
FROM partners, calls_nc_sell_daily
WHERE calls_nc_sell_daily.date >= '$date_start'
AND calls_nc_sell_daily.date <= '$date_stop'
AND partners.id = calls_nc_sell_daily.partner_id_fk
WHEN 结果字段由以下 PHP 片段解析:
$tables = array();
for($i=0;$i<$elements;$i++) {
$name = mysql_field_name($result,$i);
$tables[$name] = mysql_field_table($result,$name);
}
print_r($tables);
预期的:
Array
(
[buyer] => partners
[market] => calls_nc_sell_daily
[name] => partners
[partners_id_fk] => calls_nc_sell_daily
[seller] => partners
)
实际的:
Array
(
[buyer] => partners
[market] => partners
[name] => partners
[partners_id_fk] => partners
[seller] => partners
)