[support] book module

Sarah.Vardy at student.griffith.edu.au Sarah.Vardy at student.griffith.edu.au
Wed Nov 21 05:33:37 UTC 2007


I'm trying to alter this query in the book module:


<?php $node_result = db_query(db_rewrite_sql('SELECT n.nid, n.title, b.parent FROM {node} n INNER JOIN {book} b ON n.vid = b.vid WHERE n.nid = %d'), $nid);
  if (db_num_rows($node_result) > 0) {
      $node = db_fetch_object($node_result);
  } ?>
To this:
<?php $node_result = db_query(db_rewrite_sql('SELECT n.nid, n.title, b.parent, f.filepath FROM {node} n INNER JOIN {book} b ON {n.vid = b.vid} n join 
  {image_attach} nr on (n.nid = nr.nid)INNER JOIN {files} f ON nr.iid = f.nid WHERE n.nid = %d && f.filename = 'thumbnail''), $nid);
  if (db_num_rows($node_result) > 0) {
      $node = db_fetch_object($node_result);
  } ?>
and then add a parameter in the function call:
<?php 
    return theme('book_export_html', check_plain($node->title), $node->$content, $node->filepath); ?>
and then add this parameter to the function arguments:
<?php function theme_book_export_html($title, $content)  ?>
and then of course print it...
This is the error I'm getting in the apache logs:
[Wed Nov 21 23:40:54 2007] [error] [client 132.234.220.196] PHP
Parse error: syntax error, unexpected T_STRING in
/www/itnews2/modules/book/book.module on line 651
Anybody have any suggestions?
Sarah


Research Computing Services
Sarah.Vardy at student.griffith.edu.au
0402241794
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20071121/3c34b654/attachment-0001.htm 


More information about the support mailing list