Answer the question
In order to leave comments, you need to log in
How to fix MoDX error?
Mistake:
Error : Uncaught Error: Call to undefined function mysql_num_rows() in /home/h/hotelbeta/public_html/manager/includes/document.parser.class.inc.php(1965) : eval()'d code:18
Stack trace:
#0 /home/h/hotelbeta/public_html/manager/includes/document.parser.class.inc.php(1965): eval()
#1 /home/h/hotelbeta/public_html/manager/includes/document.parser.class.inc.php(2116): DocumentParser->evalSnippet('$idd = $modx->d...', Array)
#2 /home/h/hotelbeta/public_html/manager/includes/document.parser.class.inc.php(2028): DocumentParser->_get_snip_result('slider')
#3 /home/h/hotelbeta/public_html/manager/includes/document.parser.class.inc.php(2718): DocumentParser->evalSnippets('parseDocumentSource('prepareResponse()
#6 /home/h/hotelbeta/public_html/index.php(139): DocumentParser->executePa
<?php
$idd = $modx->documentIdentifier;
$res = $modx->getDocumentChildren(
$id = 207,
$active = 1,
$deleted = 0,
'id, menutitle',
$where = 'hidemenu = 0',
$sort='menuindex',
$dir='asc',
$limit
);
$i=1;
foreach($res as $key => $value) {
$quer="SELECT*FROM modx_site_tmplvar_contentvalues where tmplvarid=59 and contentid=".$value[id];
$res=MYSQL_QUERY($quer);
if (mysql_num_rows($res)==0) { $img="";}
else
{
@$v=mysql_fetch_assoc($res);
@$v[value]=substr ( $v[value], 1 );
@$size = getimagesize ($v[value]);
@$w=$size[0]; $h=$size[1];
echo "<img src=\"[(base_url)]$v[value]\" width=\"$w\" height=\"$h\" alt=\"\" />";
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question