关于查询返回实体的问题
//实体类
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> class Newes { //var advertisingid; //var adcontent; private int advertisingid; private String adcontent; private String texttitle; private String prclink; private String time; private String urllink; private int newtype; private String newlaiyuan; public function getId() { return $this->advertisingid; } public function setId($advertisingid) { $this->advertisingid=$advertisingid; return $this; } public function getAdcontent() { return $this->adcontent; } public function setAdcontent($adcontent) { $this->adcontent=$adcontent; return $this; } public function getTexttitle() { return $this->texttitle; } public function setTexttitle($texttitle) { $this->texttitle=$texttitle; return $this; } }
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->$sql="select * from newes where advertisingid =1";$abc =mysql_query($sql);/**while($num =mysql_fetch_array($abc)){ $num}*/