<![CDATA[ Call to undefined method DBAPI::getFullTableName() - My Forums]]> https://forums.modx.com/thread/?thread=88665 <![CDATA[Call to undefined method DBAPI::getFullTableName()]]> https://forums.modx.com/thread/88665/call-to-undefined-method-dbapi-getfulltablename#dis-post-487700 I am trying to update a custom database table from a web user form when submitted using the following:
but get the - Call to undefined method DBAPI::getFullTableName() - error msg at line 19.
The table has no prefix other than the database name.
$seats = $_POST["seats"];

$places = $_POST["places"];

$sid = $_POST["sessionID"];

$new_seats = $places - $seats;

// ******** UPDATE SESSION PLACES **********
#################################################################################
require_once('../manager/includes/config.inc.php');
require_once('../manager/includes/document.parser.class.inc.php');
$modx = new DocumentParser;

	$new_seats = update_places($sid, $new_seats);

	function update_places($new_seats) {
        global $modx;
		$table = $modx->db->getFullTableName('xtra_session');
         
		$result = $modx->db->update( 'places = "' . $new_seats . '"', $table, 'id = "' . $sid . '"' );
                return $result;         // Returns 'true' on success, 'false' on failure.
}


Any help greatly appreciated.]]>
Twobears Jan 19, 2014, 12:36 AM https://forums.modx.com/thread/88665/call-to-undefined-method-dbapi-getfulltablename#dis-post-487700
<![CDATA[Re: Call to undefined method DBAPI::getFullTableName()]]> https://forums.modx.com/thread/88665/call-to-undefined-method-dbapi-getfulltablename#dis-post-487736 Twobears Jan 19, 2014, 03:15 PM https://forums.modx.com/thread/88665/call-to-undefined-method-dbapi-getfulltablename#dis-post-487736 <![CDATA[Re: Call to undefined method DBAPI::getFullTableName() (Best Answer)]]> https://forums.modx.com/thread/88665/call-to-undefined-method-dbapi-getfulltablename#dis-post-487703 sottwell Jan 19, 2014, 02:10 AM https://forums.modx.com/thread/88665/call-to-undefined-method-dbapi-getfulltablename#dis-post-487703