L
L
Lulzsec2017-04-05 18:58:04
PHP
Lulzsec, 2017-04-05 18:58:04

Working with a database in Joomla?

It is necessary to make one more connection to the database in a separate file in the root of the site, for some reason this code does not work (it is not even processed, everything is displayed after "$db = JFactory::getDbo();")

<?
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('id', 'title', 'fulltext', 'created')));
$query->from($db->quoteName('#__content'));
$query->where($db->quoteName('fulltext') . ' LIKE '. $db->quote('\'%\''));
$query->order('ordering ASC');

Don't know what the problem is (trying locally)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Bukharev, 2017-04-05
@evgenybuckharev

Short tag <? not processed by the interpreter

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question