Remove html tags in a databasejoin

louis037

Member
Hello everyone, I try to get stripped the tags <p> in my query which is in a databasejoin.
My concat code is :
Code:
(SELECT data_abbreviation FROM data_titles_and_predicates WHERE data_titles_and_predicates.id = {thistable}.contact_title), ' ',{thistable}.contact_firstname, ' ',{thistable}.contact_lastname
The contact_title column store the title in html with tags <p> and <sup>. I just want to get off the <p> tag and keep the <sup> tag.
In eval options I tryed :
Code:
$title_stripped = strip_tags($opt->text, 'p';
$opt->text = $title_stripped;
But it gives me an error.
Could you telle me where I'm wrong. Thanks!
 
Well, you are missing a closing paren on the first line of your code.

But I don't think that'll help you. The 'eval options' is run on the array of results returned by the query.

But you aren't returning {thistable}.contact_title, you are trying to join on it in your subquery. Which looks weird to me, if contact_title is a string surrounded by HTML tags, and you are trying to match it to an 'id' on another table, which I would expect to be an integer.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top