web101
06-25-2007, 03:16 PM
I am using Using MYSQL 3.23 and PHP.
Two textfields in two tables with field and table names as...
base_txt in table1
stack_txt in table2
stack_txt relates to base_txt like this
"(<br>)base_text(<br>)" .
Both <br>'s being optional.
How do I write a SQL using REGEXP to extract the stack_text which has a particular base_text?
My attempted SQL is ....
SELECT table2.*
FROM table2, table1
WHERE table2.stack_text LIKE '<br>'+ base_text+'<br>'
AND table1.id = "1234"
Two textfields in two tables with field and table names as...
base_txt in table1
stack_txt in table2
stack_txt relates to base_txt like this
"(<br>)base_text(<br>)" .
Both <br>'s being optional.
How do I write a SQL using REGEXP to extract the stack_text which has a particular base_text?
My attempted SQL is ....
SELECT table2.*
FROM table2, table1
WHERE table2.stack_text LIKE '<br>'+ base_text+'<br>'
AND table1.id = "1234"