我使用 SugarCRM,当我导出潜在客户时,我可以获得所有字段,包括我添加的自定义字段。但是当我尝试从潜在客户列表中下载潜在客户时,只有几个字段从数据库中导出。我需要获取所有字段,例如潜在客户下载
我了解 Prospect_list.php 文件包含用于导出此文件的代码,我更改了此文件,但发生数据库故障,请帮我完成此文件。
$prospects_query = "SELECT p.id AS id, 'Prospects' AS related_type, '' AS \"name\", p.first_name AS first_name, p.last_name AS last_name,p.title AS title, p.salutation AS salutation,
p.primary_address_street AS primary_address_street,p.primary_address_city AS primary_address_city, p.primary_address_state AS primary_address_state, p.primary_address_postalcode AS primary_address_postalcode, p.primary_address_country AS primary_address_country,
p.account_name AS account_name,
ea.email_address AS email_address, ea.invalid_email AS invalid_email, ea.opt_out AS opt_out, ea.deleted AS ea_deleted, ear.deleted AS ear_deleted, ear.primary_address AS primary_address,
p.do_not_call AS do_not_call, p.phone_fax AS phone_fax, p.phone_other AS phone_other, p.phone_home AS phone_home, p.phone_mobile AS phone_mobile, p.phone_work AS phone_work , p.description As Description
FROM prospect_lists_prospects plp
INNER JOIN prospects p ON plp.related_id=p.id
LEFT JOIN email_addr_bean_rel ear ON ear.bean_id=p.id AND ear.deleted=0
LEFT JOIN email_addresses ea ON ear.email_address_id=ea.id
WHERE plp.prospect_list_id = $record_id AND plp.deleted=0
AND p.deleted=0
AND (ear.deleted=0 OR ear.deleted IS NULL)";
糖团队在这里指定了要导出的字段,但我需要获取表中的所有字段[前景]如何执行此操作。