SQL Query

This topic contains 1 reply, has 2 voices, and was last updated by  Stiofan O’Connor 7 years, 6 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #393833

    whattodo-vi
    Full Member
    Post count: 187

    Can support please help me debug this statement? $sql = “SELECT * FROM wp_geodir_gd_event_detail where post_status = ‘publish’ and is_featured = ‘1’ and event_type = ‘upcoming’ ORDER BY rand() DESC LIMIT 6”;

    It works except for the upcoming part. I want a randomized list of upcoming and featured events in a custom slider.

    Thank you 🙂

    #393942

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Random lists are not what you want, they can’t be cached and will take up much more resources.

    Also you would be best getting the event_id from the wp_geodir_event_schedule table by selecting event_date > NOW()

    Stiofan

Viewing 2 posts - 1 through 2 (of 2 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount