Jump to content
Sign in to follow this  
oludasi

skripti

Recommended Posts

Panemu thehitch ieliktos skriptus.

Bet news skripts izvelk visu no topikiem arii.

SQL:

SELECT * FROM forums_topics as t LEFT JOIN forums_posts as p ON t.tid = p.topic_id LEFT JOIN core_attachments_map as a_map ON a_map.id1 = p.pid LEFT JOIN core_attachments as a ON a.attach_id = a_map.attachment_id  LEFT JOIN core_members as m ON t.starter_id = m.member_id WHERE t.forum_id = 2 ORDER BY tid DESC

varetu palidzet salbot, lai izvelk tikai pirmo postu.

Share this post


Link to post
Share on other sites

    SELECT * FROM forums_topics as t  
    LEFT JOIN core_attachments_map as a_map ON a_map.id1 = t.tid 
    LEFT JOIN core_attachments as a ON a.attach_id = a_map.attachment_id  
    LEFT JOIN core_members as m ON t.starter_id = m.member_id 
    WHERE t.forum_id = 2  ORDER BY tid DESC

Share this post


Link to post
Share on other sites
28 minutes ago, Aris said:

    SELECT * FROM forums_topics as t  
    LEFT JOIN core_attachments_map as a_map ON a_map.id1 = t.tid 
    LEFT JOIN core_attachments as a ON a.attach_id = a_map.attachment_id  
    LEFT JOIN core_members as m ON t.starter_id = m.member_id 
    WHERE t.forum_id = 2  ORDER BY tid DESC

tagad izvelk pa vienam :). Bet nerada postus kas ieksa. Nu nerada tekstu jaunumos ieksa. palidziet ludzu

Share this post


Link to post
Share on other sites

Lai rādītu postus un tekstu iekšā, izvelc atsevišķi no forum_posts 

 

Edited by Aris
  • Downvote 1

Share this post


Link to post
Share on other sites
8 minutes ago, Aris said:

Lai rādītu postus un tekstu iekšā, izvelc atsevišķi no forum_posts 

 

Ka lai izvelk, es nemaku. Es izmeginaju visu, nesanaca.

Share this post


Link to post
Share on other sites

$description_res = mysqli_query($db, "SELECT * FROM forums_posts WHERE topic_id = '".$row['tid']."' ORDER BY pid ASC LIMIT 1");
$description = mysqli_fetch_assoc($description_res);  

  • Like 1

Share this post


Link to post
Share on other sites
11 hours ago, Aris said:

$description_res = mysqli_query($db, "SELECT * FROM forums_posts WHERE topic_id = '".$row['tid']."' ORDER BY pid ASC LIMIT 1");
$description = mysqli_fetch_assoc($description_res);  

Čalis neko nemāk, bet Tu viņam visu uz paplātes paliec. Varbūt vajadzētu, lai viņš pats iemācās un padomā pirms raksta ko tādu?

Autoram: Ludzu Tev links uz to, ko tu 'nemāki' un iemācies - https://www.w3schools.com/php/func_mysqli_query.asp

Share this post


Link to post
Share on other sites

Taču var paskatīties YT vai google pamācības pa visu ikseviši pa forumumiem īsti nezinu pa ko iet runa nesen piecēlos bet varu maybe help Vng Parmekle direktorijas

un parbaudi katru failu zinu kad tas aizņem dafiga laika bet ir noderīgi vismaz kad man bija forums :)

Share this post


Link to post
Share on other sites
On 8/11/2018 at 12:01 PM, FreshLv said:

Taču var paskatīties YT vai google pamācības pa visu ikseviši pa forumumiem īsti nezinu pa ko iet runa nesen piecēlos bet varu maybe help Vng Parmekle direktorijas

un parbaudi katru failu zinu kad tas aizņem dafiga laika bet ir noderīgi vismaz kad man bija forums :)

Tu pats saprati ko tu uzrakstiji? xD Ja pat nezini par ko iet runa, kapēc tu komentē? Kapēc viņam būtu kautkādas direktorijas japārmeklē, un faili? WAT????

 

Autoram: Nevēlies ielikt visu skriptu? Vieglāk būtu arī paskatīties kas tev echo notiek.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.