Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
I am having a bit of a problem understanding how to trap and handle database errors. Lets say i have a table with the following definition:
CREATE TABLE test (
nid INTEGER(10) UNSIGNED NOT NULL,
email VARCHAR(128) NOT NULL,
UNIQUE INDEX u_email_idx(email)
)
For the purposes of this discussion, email is a field that contains a unique email address. The uniqueness of this address is enforced by the unique index u_email_idx.
global $user;
if (user_access("access content")) {
$stories = "";
$queryResult = db_query_range("SELECT n.uid, u.name, max(n.nid) FROM {node} n INNER JOIN {users} u ON u.uid = n.uid WHERE n.type = 'story' AND n.status = 1 GROUP BY n.uid, u.name ORDER BY 3 DESC", 0, 3);
while ($node = db_fetch_object($queryResult)) {
$stories .= node_title_list(db_query_range("SELECT n.title, n.nid FROM {node} n WHERE n.type = 'story' AND n.status = 1 AND n.uid = " . $node->uid . " ORDER BY n.nid DESC", 0, 3));
}
return $stories
. "
Hi all,
I would like to use flexinode to create custom node types. I'm ready with the design, but now I need to import data from my previous CMS into Drupal.
Any ideas on how to write such a migration script ??
Should I write a specific module, or is it better to write a PHP script completely out of Drupal ??
I am in need of a module that allows an Admin role to send different emails/newsletters to registered members, and then archive them.
For example, the site I'm working on is for a non-profit. The Director sends out an informal update to the association members every week. I need to enable a form to send these and have the sent messages archived in a "Notes from..." heading. She also does monthly newsletters and infrequent legislative updages, each of these would have to be archived under a "Newletter" and "Legislative Update" heading.
While weblinks are treated as nodes inside the drupal they are displayed not like all other nodes (like story, filestore or blog entry). And think it's not right. I wanted to modify the module by myself but my poor knowledge of PHP prevented me from succeeding.
All that i figured out is that in this module a theme_weblink_node_short function is used to display weblinks in a nodes-list. In all other modules as far as i understood no such "special" functions are used.
I'm pretty new to Drupal, so forgive me if this is an RTFM.
I have added an RSS feed to my Drupal instance. I can update the items just fine by hand. I can't seem to find anything explaining what I need to do in order to get it to update automatically.
I updated the feed to set the update interval to 15 minutes, but it doesn't update.
cron.php is in place and running as root. Right now it's set to run every hour, but according to the RSS page my feed hasn't updated for 1 hour 54 minutes.