🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: bit.listserv.sqlinfo
1 messages
1 total messages Started by 1961 Mon, 27 May 2002 17:16
SQL LIKE %%
#253
Author: 1961
Date: Mon, 27 May 2002 17:16
26 lines
1979 bytes
Hi!
I am working on a recruitment site that allows people to search
the database for POSITIONS.
When this is called from a user submit/search form
the passed URL parameter is turned into the variable VARpos.
Using LIKE  '%VARpos%'  this will return 'similar' results, as in if
the search is for 'manager' this will also find 'assistant manager'..etc
---------------------
SELECT *
FROM vacancies
R_POSITION_1 LIKE '%VARpos%'
-------------------------------------------------------

My problem is that I now want to find matching entries in two database
tables.
This is fine is they are exactly the same, but I can't figure out how to use
the LIKE statement, as used above.
--------------------------------------------
SELECT *
FROM vacancies, Register
WHERE R_POSITION_1 LIKE position
---------------------------------------------------------
using % just gives an error.
Basically how can I turn an extracted field from the table and
use that as the variable VARpos to find similar/ LIKE matches in the other
table
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads