global $_CB_framework;
global $_CB_database;
$query = "SELECT `id` FROM `#__database_table` WHERE `fieldname` = '[cb_myfieldname]' ORDER BY `id` DESC LIMIT 1";
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
global $_CB_framework;
global $_CB_database;
require_once( $_CB_framework->getCfg( 'absolute_path' ). '/includes/my_functions.php');
//$fieldname = $_CB_database->quote([cb_myfieldname]); // doesn't work for some reason...
$fieldname = $_CB_database->getEscaped([cb_myfieldname]);
$query = "SELECT `id` FROM `#__database_table` WHERE `fieldname` = $fieldname ORDER BY `id` DESC LIMIT 1";
// get CB user info
$_CB_database->setQuery($query);
$neededID = $_CB_database->loadResult();
$test = custom_function($neededID); // then function performs necessary tasks
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.