I am having some pretty hefty trouble with this Drupal challenge. The blog we are building requires some tweaks that even our best themers and programmers cannot figure out [yet]. Here are our present themer's notes...can you contribute a solution for this? The site is http://theintersectionblog.com
Disclaimer! This is not spam nor a cheap attempt to get hits, this blog is not launched yet and we cannot fix this navigational issue...
////
Programmer's notes:
We have a Drupal site where each blog entry represents a chapter in a book. There will be future blog/entries/chapters, so we need a dynamic link to the next page. Each blog page has a cck field for the chapter number, and we are only searching the blog content type. All I need is the nid of (value of current chapter field + 1) I'm a themer, not a programmer, and tried the following, but don't know enough to continuel:
The number "1" on the last line should be replaced with the current node chapter number
$result = mysql_query("
SELECT node.nid AS nid, node.title AS node_title, node_data_field_chapter.field_chapter_value AS node_data_field_chapter_field_chapter_value
FROM node node
LEFT JOIN content_type_blog node_data_field_chapter ON node.vid = node_data_field_chapter.vid
WHERE (node.type in ('blog')) AND (node_data_field_chapter.field_chapter_value = 1)
or die(mysql_error());
echo $result;
Here is a breakdown of a sample page (node/19, chapter 3)
[3] => stdClass Object
(
[nid] => 19
[type] => blog
[language] =>
[uid] => 3
[status] => 1
[created] => 1228624215
[changed] => 1228791895
[comment] => 0
[promote] => 1
[moderate] => 0
[sticky] => 0
[tnid] => 0
[translate] => 0
[vid] => 19
[revision_uid] => 1
[title] => blah blah blah
[body] => blah blah blah
[teaser] => blah blah blah
[log] =>
[revision_timestamp] => 1228791895
[format] => 2
[name] => first last
[picture] =>
[data] => a:4:{s:13:"form_build_id";s:37:"form-e29b7baa8c87fed7cae9fd7499ede34f";s:7:"contact";i:1;s:14:"picture_delete";s:0:"";s:14:"picture_upload";s:0:"";}
[path] => content/your-web-20-strategy-where-start
[field_author] => Array
(
[0] => Array
(
[nid] => 12
)
)
[field_menu_tagline] => Array
(
[0] => Array
(
[value] => blah blah blah
)
)
[field_chapter] => Array
(
[0] => Array
(
[value] => 3
)
)
[last_comment_timestamp] => 1228624215
[last_comment_name] =>
[comment_count] => 0
[taxonomy] => Array
(
)
[files] => Array
(
)
[comment_original_value] => 2
)
------end programmer question --------------
Comments
How about $new_chapter =
How about
Note that the query is 'drupal'ized.
CK Ng | myFineJob.com
consultation • web design & development • content development • site domain, hosting & maintenance • software design & development