MẪ$T?Я
02-23-2010, 06:46 PM
Hello , :rolleyes:
I have a problem in this code .
I'm doing a repetition of the template and extract all the fields in the databases
But does not do it, but the extraction of the first record or last record
$sql = $vbulletin->db->query_read("
SELECT *FROM " . TABLE_PREFIX . "xvip
ORDER BY vipid DESC
");
while($Fetch = $db->fetch_array($sql)){
eval('$VipBlogD[\'vipblogbit\'] = "' . fetch_template('vip_BlogSectionBit') . '";');
}
eval('print_output("' . fetch_template('vip_BlogSection') . '");');
}
BlogSectionBit template
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<thead>
<tr>
<td colspan="3" class="tcat">blog</td>
</tr>
</thead>
<tbody>
<tr>
<td class="thead" width="100%">blog title</td>
<td class="thead">Last update</td>
<td class="thead">edit</td>
</tr>
</tbody>
<tbody>
$VipBlogD[vipblogbit]
</tbody>
</table>
vip_BlogSectionBit template
<tr>
<td class="alt1" width="100%">$Fetch[blogtitle]</td>
<td class="alt1">$Fetch</td>
<td class="alt1">edit</td>
</tr>
Please let me what a problem .
--------------- Added [DATE]1267036467 at 1267036467 ---------------
Hello ,
Does any of you any help ?
I have a problem in this code .
I'm doing a repetition of the template and extract all the fields in the databases
But does not do it, but the extraction of the first record or last record
$sql = $vbulletin->db->query_read("
SELECT *FROM " . TABLE_PREFIX . "xvip
ORDER BY vipid DESC
");
while($Fetch = $db->fetch_array($sql)){
eval('$VipBlogD[\'vipblogbit\'] = "' . fetch_template('vip_BlogSectionBit') . '";');
}
eval('print_output("' . fetch_template('vip_BlogSection') . '");');
}
BlogSectionBit template
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<thead>
<tr>
<td colspan="3" class="tcat">blog</td>
</tr>
</thead>
<tbody>
<tr>
<td class="thead" width="100%">blog title</td>
<td class="thead">Last update</td>
<td class="thead">edit</td>
</tr>
</tbody>
<tbody>
$VipBlogD[vipblogbit]
</tbody>
</table>
vip_BlogSectionBit template
<tr>
<td class="alt1" width="100%">$Fetch[blogtitle]</td>
<td class="alt1">$Fetch</td>
<td class="alt1">edit</td>
</tr>
Please let me what a problem .
--------------- Added [DATE]1267036467 at 1267036467 ---------------
Hello ,
Does any of you any help ?