Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2021-10-30 09:04:22

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,635
GitHub Twitter

[Solved] SQL Select and single quote into records

Hi TXP experts!

I’m having a problem with an SQL query due to the use of a single quote sign (') within one of the article title:

implode(',', safe_column('ID', 'textpattern', '1=1 AND Section="one-section" OR Section="another-section" ORDER BY SUBSTRING_INDEX(Title, "@", -1) LIMIT 0, 999'))

The corresponding title isn’t extracted… 😢

Is there a way to got safe results?

Thank you lot by advance. 😉

EDIT: The problem isn’t due to the use of a single quote, the query extract only 10 results

Last edited by Pat64 (2021-10-30 09:28:14)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#2 2021-10-30 09:30:57

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,635
GitHub Twitter

Re: [Solved] SQL Select and single quote into records

Whoops. I’m the worst Textpattern user from this forum: I omitted to set the limit parameter within my article_custom tag…


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

Board footer

Powered by FluxBB