| 1 |
<?PHP |
<?PHP |
| 2 |
// $Id: biblio.pages.inc,v 1.1.2.62 2009/03/27 20:43:46 rjerome Exp $ |
// $Id: biblio.pages.inc,v 1.1.2.63 2009/03/28 01:00:42 rjerome Exp $ |
| 3 |
/** |
/** |
| 4 |
* |
* |
| 5 |
* Copyright (C) 2006-2008 Ron Jerome |
* Copyright (C) 2006-2008 Ron Jerome |
| 247 |
if (is_numeric($term[0])){ |
if (is_numeric($term[0])){ |
| 248 |
$joins[] = "inner join {biblio_contributor} as bc". $bcc ." on n.vid = bc". $bcc .".vid"; |
$joins[] = "inner join {biblio_contributor} as bc". $bcc ." on n.vid = bc". $bcc .".vid"; |
| 249 |
$where[] = "bc". $bcc .".cid = '%d' "; |
$where[] = "bc". $bcc .".cid = '%d' "; |
| 250 |
|
//$where[] = 'bc'. $bcc .'.cid = (select cid from {biblio_contributor_data} |
| 251 |
|
// where cid = %d |
| 252 |
|
// or aka = %d |
| 253 |
|
// or cid = (select aka from {biblio_contributor_data} where cid = %d) |
| 254 |
|
// or aka = (select aka from {biblio_contributor_data} where cid = %d)) '; |
| 255 |
$terms[] = db_escape_string($term[0]); |
$terms[] = db_escape_string($term[0]); |
| 256 |
|
// $terms[] = db_escape_string($term[0]); |
| 257 |
|
// $terms[] = db_escape_string($term[0]); |
| 258 |
|
// $terms[] = db_escape_string($term[0]); |
| 259 |
}else{ |
}else{ |
| 260 |
$where[] = " bcd". $bcc .'.name '. $match_op .' "[[:<:]]%s[[:>:]]" '; |
$where[] = " bcd". $bcc .'.name '. $match_op .' "[[:<:]]%s[[:>:]]" '; |
| 261 |
$joins[] = " JOIN {biblio_contributor} as bc". $bcc ." on b.vid = bc". $bcc .".vid "; |
$joins[] = " JOIN {biblio_contributor} as bc". $bcc ." on b.vid = bc". $bcc .".vid "; |