Ok... I just can't figure out why the function below is causing this error:
DB Error: 1054: Unknown column 'eng' in 'where clause'
Why is it confusing 'eng' as a column instead of a result?
Here is the function:
function swerecentcolumns() {
global $dbconn, $pntable;
echo "<table border=\"0\" cellspacing=\"2\" cellpadding=\"2\">";
$query = "SELECT artid, title, slanguage, secauthor FROM $pntable[seccont] WHERE slanguage=eng ORDER BY artid DESC LIMIT 5";
$result = $dbconn->Execute($query);
if ($dbconn->ErrorNo() <> 0) {
echo "DB Error: ".$dbconn->ErrorNo().": ".$dbconn->ErrorMsg()."<br />";
exit();
}
if ($result->EOF) {
return;
}
while (list($artid, $title, $slanguage, $author) = $result->fields) {
$result->MoveNext();
$content .= "<tr><td valign=\"top\"><img vspace=\"2\" src=\"images/global/bullet.gif\"></td><td><font class=\"pn-sub\">"
."<a href=\"modules.php?op=modload&name=Sections&file=index&req=viewarticle&artid=$artid\">"
."$title</a></font>"
."<br><font class=\"pn-sub\">by: "
."$author</font></td></tr>";
}
themecenterbox($content);
echo "</table>";
}
END
Thanks for any help!
Jim