Skip to main content

[MXAE] How To Get Articles (And Print Out)

To list an article (or articles) using MXAE-API.

//one article
$program = new mxProgram;
$program->getBy(array('id' => $programCodeOrID, 'code' => array($programCodeOrID, '=', 'OR')));
$article = $program->getArticle($recId);



//articles (more than one)
$arcs = $prog->getArticles(array('category' => $fVal, 'orderby' => ' foreach($arcs as $theArcs) {
echo "{$theArcs->nationality}";
echo "{$theArcs->dateofbirth->format("d-m-Y")}"; //date format
}



//total articles
$totalArticle = $program->getArticleCount();

Comments

Popular posts from this blog

[PHP] Rujukan Untuk Penyelesaian Masalah Serangan CSRF

Setiap kali membuat projek yang membuka aksesnya kepada orang awam, pasti akan "terdedah" dengan pelbagai jenis serangan siber. Antaranya; Cross-site scripting dan Cross Site Request Forgery (CSRF) Entri ini lebih kepada penyelesaian CSRF. Hasil carian di internet, beberapa penyelesaian ini (dan penduan untuk pemahaman) mungkin sesuai untuk dirujuk.   http://shiflett.org/articles/cross-site-request-forgeries   https://gist.github.com/ziadoz/3454607 http://resources.infosecinstitute.com/fixing-csrf-vulnerability-in-php-application/   https://www.sitepoint.com/preventing-cross-site-request-forgeries/   http://stackoverflow.com/questions/6287903/how-to-properly-add-csrf-token-using-php