diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-10-12 18:35:21 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-10-12 18:35:21 +0000 |
commit | 73d61b7839c407cee996a6d79f7d4bce63e81d87 (patch) | |
tree | 4aa4090e16490588a38d2e2cfd2abff6ba899c18 /modules | |
parent | d6e54f8fa1cdfa0bf2c974096cb736c1af59b4bf (diff) | |
download | brdo-73d61b7839c407cee996a6d79f7d4bce63e81d87.tar.gz brdo-73d61b7839c407cee996a6d79f7d4bce63e81d87.tar.bz2 |
- fixed 4 SQL queries to use ANSI SQL instead: '||' --> 'OR'
Diffstat (limited to 'modules')
-rw-r--r-- | modules/book.module | 4 | ||||
-rw-r--r-- | modules/book/book.module | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/book.module b/modules/book.module index c66907ea0..6d7d9f536 100644 --- a/modules/book.module +++ b/modules/book.module @@ -47,8 +47,8 @@ function book_view($node, $main = 0) { else { if ($node->nid && $node->parent) { $list = book_parent_query($node->parent); - $next = db_fetch_object(db_query("SELECT n.nid, n.title FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE n.status = '$status[posted]' AND $list AND (b.weight > '$node->weight' || (b.weight = '$node->weight' AND n.title > '". check_query($node->title) ."')) ORDER BY b.weight ASC,n.title ASC")); - $prev = db_fetch_object(db_query("SELECT n.nid, n.title FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE n.status = '$status[posted]' AND $list AND (b.weight < '$node->weight' || (b.weight = '$node->weight' AND n.title < '". check_query($node->title) ."')) ORDER BY b.weight DESC,n.title DESC")); + $next = db_fetch_object(db_query("SELECT n.nid, n.title FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE n.status = '$status[posted]' AND $list AND (b.weight > '$node->weight' OR (b.weight = '$node->weight' AND n.title > '". check_query($node->title) ."')) ORDER BY b.weight ASC,n.title ASC")); + $prev = db_fetch_object(db_query("SELECT n.nid, n.title FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE n.status = '$status[posted]' AND $list AND (b.weight < '$node->weight' OR (b.weight = '$node->weight' AND n.title < '". check_query($node->title) ."')) ORDER BY b.weight DESC,n.title DESC")); } $output .= "<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"0\" WIDTH=\"100%\">\n"; diff --git a/modules/book/book.module b/modules/book/book.module index c66907ea0..6d7d9f536 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -47,8 +47,8 @@ function book_view($node, $main = 0) { else { if ($node->nid && $node->parent) { $list = book_parent_query($node->parent); - $next = db_fetch_object(db_query("SELECT n.nid, n.title FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE n.status = '$status[posted]' AND $list AND (b.weight > '$node->weight' || (b.weight = '$node->weight' AND n.title > '". check_query($node->title) ."')) ORDER BY b.weight ASC,n.title ASC")); - $prev = db_fetch_object(db_query("SELECT n.nid, n.title FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE n.status = '$status[posted]' AND $list AND (b.weight < '$node->weight' || (b.weight = '$node->weight' AND n.title < '". check_query($node->title) ."')) ORDER BY b.weight DESC,n.title DESC")); + $next = db_fetch_object(db_query("SELECT n.nid, n.title FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE n.status = '$status[posted]' AND $list AND (b.weight > '$node->weight' OR (b.weight = '$node->weight' AND n.title > '". check_query($node->title) ."')) ORDER BY b.weight ASC,n.title ASC")); + $prev = db_fetch_object(db_query("SELECT n.nid, n.title FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE n.status = '$status[posted]' AND $list AND (b.weight < '$node->weight' OR (b.weight = '$node->weight' AND n.title < '". check_query($node->title) ."')) ORDER BY b.weight DESC,n.title DESC")); } $output .= "<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"0\" WIDTH=\"100%\">\n"; |