FAQ
Search our FAQs for the most common issues to your problems.
Share

Why can't I use mxArticle:replace() after using mxArticle::reset()?

The reason is that mxArticle::reset() will reset the entire object including the id of the article object. Hence, mxArticle::replace() will fail since the article's id to replace is not known.

<?php
$program = $_mxPub->factory($programID, MX_OBJECT_PROGRAM);
$article = $program->getArticle($articleID);
$article->reset();
$article->name = 'John Doe';
if (!$article->replace()) {
    echo "Unable to replace article! ".$article->getLastErrorMessage();
}
?>

MXAE Release News

MXAE 2.7.5 Released
We would like to announce the immediate availability of MXAE 2.7.5. This release focuses on...




Tips & Tricks

How to change SQL Query to MXAPI
SQL  :  Select * from...




MXAE Free Hosting

We are offering FREE hosting on MXAE platform with no string attached. You can use it as a development or demo hosting for your company. You can also use it to build your own website or host your client website.