这是我在这个网站上的第一个问题,希望有人能在这里帮助我。
我有一个包含一些字段的投资者表和一个包含一些文件的项目表
Project table
---------------------
project_investor_id 1,26,29,30,39,48
数据存储为,分隔值因此,在我的投资者管理区域中,我想为登录的投资者显示特定项目,我正在使用此功能。
public function list_all_projects_by_userid ($uid){
$rs = mysql_query("select * from project_table WHERE project_investor_id LIKE '$uid' ORDER BY project_id DESC");
$i = 0;
while ($row = mysql_fetch_assoc($rs)) {
$result[$i]['project_id'] = $row['project_id'];
$result[$i]['project_investor_id'] = $row['project_investor_id'];
$result[$i]['project_name'] = $row['project_name'];
$result[$i]['project_location'] = $row['project_location'];
$result[$i]['project_location'] = $row['project_location'];
$result[$i]['project_phase'] = $row['project_phase'];
$result[$i]['project_capital'] = $row['project_capital'];
$result[$i]['project_notes'] = $row['project_notes'];
$result[$i]['project_file'] = $row['project_file'];
$i++;
}
return $result;
}
但它不与项目合作有多个投资者。请让我知道如何重新编码?
谢谢你