Answer the question
In order to leave comments, you need to log in
Help with SQL queries?
Hello everyone in DLE to display the {custom} tag in engine/modules/function.php
There is a separate SQL query. And here's the problem I ran into.
Added a module that added the actors field to the dle_posts table. Everything works fine, but I can’t add the output of this field for {custom} in any way, since the request for the entire function is collected via echo, I output the final request to the database
SELECT p.id, p.autor, p.date, p.actors, p.short_story, CHAR_LENGTH(p.full_story) as full_story, p.xfields, p.title, p.category, p.alt_name, p.comm_num, p.allow_comm, p.fixed, p.tags, e.news_read, e.allow_rate, e.rating, e.vote_num, e.votes, e.view_edit, e.editdate, e.editor, e.reason FROM dle_post p LEFT JOIN dle_post_extras e ON (p.id=e.news_id) WHERE category regexp '(43)' AND approve=1 AND date < '2017-06-11 07:51:58' ORDER BY date DESC LIMIT 0,5
Answer the question
In order to leave comments, you need to log in
The request appears to be correct.
1) Check again exactly those records that fall into the selection, preferably for specific IDs.
Perhaps this field is empty specifically for them.
2) What type of data is in the actors field? Maybe there's some kind of BINARY, or a string with specific ASCII characters.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question