Almotmaiz.Net
03-28-2007, 03:10 PM
heloo evey body ...
i Build a PHP code to get some Information from my VB database ..
wut's wrong in my code ..
$AlzaabiChars = intval(500);
$AlzaabiDisplay = intval(3);
$SQL = $db->query_read("
SELECT post.dateline, post.pagetext, thread.threadid, thread.title
FROM post, thread
ORDER BY dateline DESC LIMIT 0, $AlzaabiDisplay");
while($Alzaabi = $db->fetch_array($SQL)){
if(strlen($Alzaabi['pagetext']) > $AlzaabiChars){
$Alzaabi['pagetext'] = substr($Alzaabi['pagetext'], 0, strrpos(substr($Alzaabi['pagetext'], 0, $AlzaabiChars), ' ')) . '...';
}else{
$Alzaabi['pagetext'] = $Alzaabi['pagetext']
}
eval('$Alzaabi .= "' . fetch_template('Alzaabi') . '";');
}
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><img border="0" src="images/KalbaEyes_tcat_02.gif" width="88" height="25"></td>
<td style="background-image: url('images/KalbaEyes_tcat_01.gif'); background-repeat: no-repeat; background-position: right center" width="100%">
<a href="showthread.php?t=$Alzaabi['threadid']">$Alzaabi['title']</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="alt1">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center">$Alzaabi['pagetext']</td>
</tr>
<tr>
<td align="left">
<a href="showthread.php?t=$Alzaabi['threadid']">Read more ..</a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><img border="0" src="images/shadow.gif" width="150" height="15"></td>
<td width="100%"> </td>
<td><img border="0" src="images/rshadow.gif" width="150" height="15"></td>
</tr>
</table>
<br />
need help
i Build a PHP code to get some Information from my VB database ..
wut's wrong in my code ..
$AlzaabiChars = intval(500);
$AlzaabiDisplay = intval(3);
$SQL = $db->query_read("
SELECT post.dateline, post.pagetext, thread.threadid, thread.title
FROM post, thread
ORDER BY dateline DESC LIMIT 0, $AlzaabiDisplay");
while($Alzaabi = $db->fetch_array($SQL)){
if(strlen($Alzaabi['pagetext']) > $AlzaabiChars){
$Alzaabi['pagetext'] = substr($Alzaabi['pagetext'], 0, strrpos(substr($Alzaabi['pagetext'], 0, $AlzaabiChars), ' ')) . '...';
}else{
$Alzaabi['pagetext'] = $Alzaabi['pagetext']
}
eval('$Alzaabi .= "' . fetch_template('Alzaabi') . '";');
}
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><img border="0" src="images/KalbaEyes_tcat_02.gif" width="88" height="25"></td>
<td style="background-image: url('images/KalbaEyes_tcat_01.gif'); background-repeat: no-repeat; background-position: right center" width="100%">
<a href="showthread.php?t=$Alzaabi['threadid']">$Alzaabi['title']</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="alt1">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center">$Alzaabi['pagetext']</td>
</tr>
<tr>
<td align="left">
<a href="showthread.php?t=$Alzaabi['threadid']">Read more ..</a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><img border="0" src="images/shadow.gif" width="150" height="15"></td>
<td width="100%"> </td>
<td><img border="0" src="images/rshadow.gif" width="150" height="15"></td>
</tr>
</table>
<br />
need help