For running J!5.1 you must https://fabrikar.com/forums/index.php?wiki/update-from-github/ or include the new file manually https://fabrikar.com/forums/index.php?threads/joomla-5-1-and-fabrik-cannot-find-files-error.54473/post-285151 See also Announcements
Please see our announcement here.
$value = '{tablename___elementname}';
$db =JFactory::getDBO();
$query=("SELECT field FROM table where field = '$value'");
$db->setQuery($query);
$response = $db->loadResult();
if ($response == 'your condition') {
return true;
} else {
return false;
}
$option = array(); //prevent problems
$option['driver'] = 'mysql'; // Database driver name
$option['host'] = ''; // Database host name
$option['user'] = ''; // User for database authentication
$option['password'] = ''; // Password for database authentication
$option['database'] = ''; // Database name
$option['prefix'] = ''; // Database prefix (may be empty)
$db = & JDatabase::getInstance( $option );
$value = '{empenc_warranty___warranty_code}';
$option = array();
$option['driver'] = 'mysql';
$option['host'] = 'localhost';
$option['user'] = 'userco_game';
$option['password'] = '123456';
$option['database'] = 'neco_game';
$option['prefix'] = 'zyz1_';
$db = & JDatabase::getInstance( $option );
$query=("SELECT * FROM seak_keycode where encrypted_keycodes = '$value' ");
$result=mysql_query($query);
if ($result == $query) {
return true;
} else {
return false;
}
$value = '{empenc_warranty___warranty_code}';
$option = array();
$option['driver'] = 'mysql';
$option['host'] = 'localhost';
$option['user'] = 'userco_game';
$option['password'] = '123456';
$option['database'] = 'neco_game';
$option['prefix'] = 'zyz1_';
$db = JDatabase::getInstance( $option );
// Best to use Joomla's query builder:
$query = $db->getQuery(true);
// Use COUNT(*) to count the # of records matched
$query->select("COUNT(*)")->from('seak_keycode');
// ALWAYS use $db->quote() for user inputted values - otherwise is a major security risk
$query->where('encrypted_keycodes = ' . $db->quote($value));
// Set the query to the db
$db->setQuery($query);
// Run the query and return a single value (the # of records matched)
$matched = $db->loadResult();
if ($matched > 0) {
// We found some records so return true
return true;
} else {
// No records found - return false.
return false;
}
$value = 1;
$option = array();
$option['driver'] = 'mysql';
$option['host'] = 'localhost';