我使用一种专有的服务器端语言,它位于 Oracle 数据库之上。使用这种语言,您可以使用虚拟表来获取填充了数据的现有记录结构,并在连接到该记录结构上运行查询,就好像它是一个表一样。
这是一个简单的例子:
//DECLARE THE RECORD STRUCTURE
record data_out (
1 prsnl [*]
2 person_id = f8
2 full_name = vc
2 position = vc
2 status = vc
2 last_access_dt_tm = vc
2 role [*]
3 role_name = vc
3 role_id = f8
) with persistscript
//QUERY PEOPLE
select into "NL:"
from person p
where p.whatever_field = "QUALIFIER"
detail
a = a + 1
stat = alterlist(data_out->prsnl, a)
data_out->prsnl[a]->person_id = p.person_id
data_out->prsnl[a]->full_name = p.name_full_formatted
data_out->prsnl[a]->position = p.position
with time=10
//USE A DUMMY TABLE TO PULL IN MORE DATA FOR EACH PERSON
select into "NL:"
from (dumt d with seq = size(data_out->prsnl,5))
,rnd_role_def rrd
,rnd_r_assign_hx rah
plan d
join rah
where rah.team_id = data_in->team_id
and rah.prsnl_id = data_out->prsnl[d.seq]->person_id
and rah.handoff_dt_tm > cnvtdatetime(curdate-90,curtime)
join rrd
where rrd.role_id = rah.role_id
order by d.seq, rrd.role_name
head d.seq
i = 0
head rrd.role_name
i = i + 1
stat = altlist(data_out->prsnl[d.seq]->role, i)
data_out->prsnl[d.seq]->role[i]->role_id = rrd.role_id
data_out->prsnl[d.seq]->role[i]->role_name = rrd.role_name
with time=10
PHP+MySQL 有这样的东西吗?如果是这样,可以以某种方式将我指向包含更多信息或操作方法的链接。谷歌搜索并没有为我找到任何东西——可能是搜索错误的关键字。