還有一個問題... @@ 請原諒我問題那麼多 >"<
就是在dashboard.template的地方 我想讓超連結可以抓到我的$MARC_ID1這個變數
但是foreach好像不能降用...
{foreach from=$mining item=mining}
{foreach from=$mids item=mids}
<tr style="background-color: {cycle values="#FFFFFF,#F7F7F7"};">
<td>
<a target="_blank" href="
http://xxx.xxx.xxx.xxx/book/check.php?id={$mids}">{$mining}</a><br/>
<td>
</tr>
{/foreach}
{/foreach}
會有$title和$MARC_ID1對不起來的問題...
請問我應該在dashboard.template怎麼改
或是在admindashboardview.class.php的function _loadMiningResults Model怎麼改
才可以把我想要的變數$MARC_ID1 傳到超連結裡呢? 謝謝!!!
以下是可以顯示$title的function _loadMiningResults Model
function _loadMiningResults( $userId )
{
$lnk = mysql_connect('l','','') or die("無法連線到該資料庫");
mysql_select_db('lifetype',$lnk)or die("無法連線到該資料庫1");
$sql = "select MARC_ID FROM history WHERE (ID = '$userId')";
$result = mysql_query($sql);
$books = Array();
while ($row = mysql_fetch_object($result))
{
$MARC_ID=$row->MARC_ID;
$sql1 = "select MARC_ID1 FROM mining WHERE (MARC_ID = ".$MARC_ID.")";
$result1 = mysql_query($sql1);
while ($row = mysql_fetch_object($result1))
{
$MARC_ID1=$row->MARC_ID1;
sybase_min_server_severity(11);
$conn = sybase_connect("", "", "") or die("Could not connect !");
sybase_select_db("totals2",$conn);
$sql2 = "select * FROM Mar3100 WHERE (MARC_ID = ".$MARC_ID1.")";
$result2 = sybase_query($sql2);
while($row = sybase_fetch_array($result2))
{
$MARC_ID1 = $row["MARC_ID"];
$title = $row["TITLE"];
$books[]=iconv("big5","UTF-8",$title);
}
}
}
return $books;
}