Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试输出由他们的别名选择的文章的简介
<?php $db =& JFactory::getDBO(); $query = "SELECT introtext FROM jmo_content WHERE alias=branchfr"; $db->setQuery($query); $text= $db->loadResult(); ?>
正常吗?它在 joomla 2.5 中有变化吗?
您的 SQL 语句缺少引号:
$query = "SELECT introtext FROM jmo_content WHERE alias = 'branchfr'";