Drupal Custom PHP file
Drupal Custom PHP file
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
// Now you can use drupal database with drupal's dbal:
// Unlock user admin if blocked
db_query("UPDATE {users} set status = 1 where uid = 1");
$nid = db_insert('table')
->fields(array(
'numbers' => ('23456')
))
->execute();
drupal_set_message(t('Content was added'));
Post a Comment