סתם כי בא לדבר
New member
היי יש לי בעיה
יש לי שני פונקציות האחת
יש לי שני פונקציות האחת
function get_data() { config::connect(); $qur = "SELECT a.id , s.id , s.r_id , s.words ,a.title , a.body , a.by , a.date FROM "; $qur .= "article AS a , words AS s where s.r_id = a.id ORDER BY a.title ASC"; $res = mysql_query($qur) or die (config::diemsg(0)."<br><center>******Error******<br>".mysql_error()."</center>"); while ($row = mysql_fetch_object($res)) { $this->data = array ( 'title' => $row->a.title , 'body' => $row->a.body , 'by' => $row->a.by , 'date' => $row->a.date , 'words' => array($row->s.words) , 'id' => $row->a.id ); } com::displaysc($this->data); }
והשניהfunction displaysc($data) { foreach ($data as $i=>$val){ $num = $i++; $title = $val['title']; echo $val['title']; $id = $val['id']; echo $val['id']; $by = $val['by']; $body = $val['body']; $date = $val['date']; switch ($_GET["act"]) { case "main": echo " <div align=\"center\"> <table width=\"734\"> <tr> <th class=\"cg\" width=\"26\" bgcolor=\"#800000\" nowrap> <div lang=\"he\" align=\"center\" class=\"font_title_cg\">no.</div> </th> <th class=\"cg\" width=\"550\" bgcolor=\"#800000\" nowrap> <div align=\"center\" class=\"font_title_cg\" style=\"width: 158; height: 19\"> ëåúøú</div></th> <th lang=\"he\" class=\"cg\" width=\"123\" bgcolor=\"#800000\" nowrap> <div lang=\"he\" align=\"center\" class=\"font_title_cg\"> úàøéê</div></th> </tr> <tr> <td class=\"cg\" width=\"26\" bgcolor=\"#008080\" id=\"call1\"><div class=\"font_body_cg\">$num</div></td> <td class=\"cg\" width=\"550\" onmousedown=\"window.location(chnageart.php?id=&act=edit)\" bgcolor=\"#008080\" id=\"call1\"> <A href=\"chnageart.php?id=$id&act=edit\" title=\"article no $num \n bla bla bla\" class=\"font_link_cg\">$title</a></td> <td class=\"cg\" width=\"123\" bgcolor=\"#008080\" nowrap id=\"call1\"><div lang=\"he\" class=\"font_body_cg\">$date</div></td> </tr> &nbs