So, say you are working with a field rowid in the table rcheck under database fildb, which is a primary key. So here is the field rowid, with the records 9800000...9800003:
rowid
9800000
9800001
9800002
9800003
I want to do inner join to the field rfile_rowids from the table rfile under database fildb, which has 2 values in each record separated by comma because I am trying to match records. Here is rfile_rowids with the 2 values separated by commas:
rfile_rowids
0,9800000
0,9800001
0,9810000
0,9820000
So far, I did:
SELECT
rc.rowid,rf.rfile_rowids
FROM fildb.rcheck rc
INNER JOIN fildb.rfile rf
ON rc.rowid LIKE SUBSTRING(rf.rfile_rowids,1,9);
However, my program keeps running and won't stop running, and I have to stop executing it. So my question is how do you inner join a table that has 1 value per row to another table that has 2 values per a row separated by a comma in MySQL?