mysql error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 1] in EXECUTE("select max(cDisplayOrder) from Pages where cParentID = LIMIT 1")
Permalink
My PHP is generating the following error:
mysql error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 1] in EXECUTE("select max(cDisplayOrder) from Pages where cParentID = LIMIT 1")
I believe it is stemming from :
Specifically, the parent page comes back null and generates an error when I add the page.
I ran this code on one server and it worked fine. Yet somehow when I tried it again on another server, it fails to work and generates the error.
Any ideas on what's causing the issue?
mysql error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 1] in EXECUTE("select max(cDisplayOrder) from Pages where cParentID = LIMIT 1")
I believe it is stemming from :
// Add the page. $parentPage = Page::getByPath('/' . $sectionListHandle); $pageSetupData = array( 'name' => $pageName, 'cHandle' => $pHeader_id, 'cDescription' => '' ); $pt = CollectionType::getByHandle($pChapter_id); $newPage = $parentPage->add($pt,$pageSetupData);
Specifically, the parent page comes back null and generates an error when I add the page.
I ran this code on one server and it worked fine. Yet somehow when I tried it again on another server, it fails to work and generates the error.
Any ideas on what's causing the issue?
Any help would be appreciated. If you find anything or have a resolution please let us know. I will also update this post should I get any further relevant information.
Thanks!
Arnel C.
InMotion Hosting Community Support Team