Search
Other DB Replacer questions
Forum

Excluding modified articles

Daniel Benson's Avatar Daniel Benson
I'm using DB replacer to replace a string in the Fulltext column as follows:

Replace:
<p style="text-align: center;">{loadmodule mod_custom,Amazon Native}</p>

With:
<p style="text-align: center;">{loadmodule mod_custom,Amazon Native}</p>
<p style="text-align: left; font-size: 10px;">This page includes affiliate links where we may receive a small commission at no extra cost to you.</p>

Which works perfectly for the first 1000 results. However, I have many more articles that I need to update and when I run the query again, it obviously picks up all the first 1000 lines.

I guess I need to structure the query using WHERE fulltext doesn't include:
<p style="text-align: left; font-size: 10px;">This page includes affiliate links where we may receive a small commission at no extra cost to you.</p>

What's the query I need to add to the WHERE field?
Peter van Westen's Avatar Peter van Westen ADMIN
Yes you can use the WHERE.

But I find it easier to change the replacement so that it doesn't contain the exact same text as the search.

For instance add an enter after the opening p tag or remove the empty colon at the end of your style definition:
<p style="text-align: center">{loadmodule mod_custom,Amazon Native}</p>
<p style="text-align: left; font-size: 10px">This page includes affiliate links where we may receive a small commission at no extra cost to you.</p>
Please post a rating at the Joomla! Extensions Directory
Daniel Benson's Avatar Daniel Benson
Thanks Peter, that's what I did in the end while waiting for a reply!

Out of interest, what would be the clause for the WHERE field to achieve what I wanted to do? It may come in handy in future.
Peter van Westen's Avatar Peter van Westen ADMIN
Something like:
introtext NOT LIKE "%This page includes affiliate links%"
Please post a rating at the Joomla! Extensions Directory
Daniel Benson's Avatar Daniel Benson
Thanks again Peter. However, introtext wouldn't contain that string anyway, so would it be:
fulltext NOT LIKE "%This page includes affiliate links%"
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription