diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-06-04 09:10:24 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-06-04 09:10:24 +0100 |
| commit | 0fbda8a14700801da06e2c253c12281fb1e5e1e8 (patch) | |
| tree | 5b9929849151c98948804f9a980ca5dd67c148eb /includes | |
| parent | 6a8891a1dc72640909c3f5b2003f208dd2174bfc (diff) | |
| download | contact-0fbda8a14700801da06e2c253c12281fb1e5e1e8.tar.gz contact-0fbda8a14700801da06e2c253c12281fb1e5e1e8.tar.bz2 contact-0fbda8a14700801da06e2c253c12281fb1e5e1e8.zip | |
contact: fix SCREF lookup to use xkey not data
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'includes')
| -rw-r--r-- | includes/lookup_contact.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/lookup_contact.php b/includes/lookup_contact.php index 1be1658..e477fb9 100644 --- a/includes/lookup_contact.php +++ b/includes/lookup_contact.php @@ -28,13 +28,13 @@ $like = '%'.strtolower( $q ).'%'; $rows = $gBitDb->getArray( "SELECT FIRST 30 lc.content_id, lc.title, - (SELECT FIRST 1 sx.data FROM ".BIT_DB_PREFIX."liberty_xref sx + (SELECT FIRST 1 sx.xkey FROM ".BIT_DB_PREFIX."liberty_xref sx WHERE sx.content_id=lc.content_id AND sx.item='SCREF') AS scref FROM ".BIT_DB_PREFIX."liberty_content lc WHERE lc.content_type_guid='contact' AND (LOWER(lc.title) LIKE ? OR EXISTS ( SELECT 1 FROM ".BIT_DB_PREFIX."liberty_xref sx - WHERE sx.content_id=lc.content_id AND sx.item='SCREF' AND LOWER(sx.data) LIKE ? + WHERE sx.content_id=lc.content_id AND sx.item='SCREF' AND LOWER(sx.xkey) LIKE ? )) ORDER BY lc.title", [ $like, $like ] |
