SilverBoy
06-10-2016, 02:38 AM
Hi
I have this code
$sql = "SELECT a.pagetext,a.contentid, a.previewimage, node.nodeid, node.parentnode, node.url, info.title, node.myfeaturetype
FROM " . TABLE_PREFIX . "cms_article as a
LEFT JOIN " . TABLE_PREFIX . "cms_node AS node ON a.contentid = node.contentid
INNER JOIN " . TABLE_PREFIX . "cms_nodeinfo AS info ON info.nodeid = node.nodeid
WHERE node.myfeaturetype = '4'
ORDER BY node.publishdate DESC ";
$result = $vbulletin->db->query_read_slave($sql);
$sections = array();
while ($section = $vbulletin->db->fetch_array($result)) {
$pagetext = $section["pagetext"];
$sections[] = array(
'title' => $section['title'],
'link' => $vbulletin->options['bburl']."/content.php?".$section['nodeid'].'-'.$section['url'],
'description' => get_summary($pagetext,$des_length),
'image' => $previewimage
);
I want to make it compatible with vb4.2.3 syntax
for example in this line
$pagetext = $section["pagetext"];
If I changed $section["pagetext"] with any other variable form the query it works, but if I use it with variable with type mediumtext it returns NULL.
Any help?
I have this code
$sql = "SELECT a.pagetext,a.contentid, a.previewimage, node.nodeid, node.parentnode, node.url, info.title, node.myfeaturetype
FROM " . TABLE_PREFIX . "cms_article as a
LEFT JOIN " . TABLE_PREFIX . "cms_node AS node ON a.contentid = node.contentid
INNER JOIN " . TABLE_PREFIX . "cms_nodeinfo AS info ON info.nodeid = node.nodeid
WHERE node.myfeaturetype = '4'
ORDER BY node.publishdate DESC ";
$result = $vbulletin->db->query_read_slave($sql);
$sections = array();
while ($section = $vbulletin->db->fetch_array($result)) {
$pagetext = $section["pagetext"];
$sections[] = array(
'title' => $section['title'],
'link' => $vbulletin->options['bburl']."/content.php?".$section['nodeid'].'-'.$section['url'],
'description' => get_summary($pagetext,$des_length),
'image' => $previewimage
);
I want to make it compatible with vb4.2.3 syntax
for example in this line
$pagetext = $section["pagetext"];
If I changed $section["pagetext"] with any other variable form the query it works, but if I use it with variable with type mediumtext it returns NULL.
Any help?