PHP MySQLi语句从两个链接表中提取更多数据

时间:2014-09-01 07:10:47

标签: mysqli

我有两个表链接为t_persons.CountryID = t_countries.CountryID。

如何在以下语句中打印t_countries中的国家/地区名称?

if ($stmt = $mysqli->prepare("Select t_persons.PersonID

        ,t_persons.CountryID                        
        ,t_persons.ImagePath                        
        ,t_persons.FamilyName
        ,t_persons.FirstName
        ,t_persons.OtherNames

From t_persons 
Inner Join t_countries On t_persons.CountryID = t_countries.CountryID
Where t_persons.PersonID = '$PersonID'")) {

0 个答案:

没有答案