SQL

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #104913
    websource
    Participant

    Hello together,
    We want to create an additional site for us to look over all the Events from the Events calendar.
    Could you give us some SQL for this?

    We would Need:
    – SELECT over all
    – SELECT over all but just the ones with a Special organiser

    Thanks!

    #105576
    Brook
    Participant

    Howdy websource,

    So even better than getting you generic SQL, I can help you obtain SQL specific to your columns and queries. First of all you should get the data that you want by using the function tribe_get_events(). It is documented in a little more detail here. Then, use a snippet like the following to obtain the SQL that make the query possibly:

    $query_args = array(
    'eventDisplay'=>'all',
    'posts_per_page'=>-1
    );
    $all_events = tribe_get_events($query_args, true);
    echo $all_events->request;
    exit;

    Does that help you get what you need? Can I clarify anything or answer further questions? Please let me know. Cheers!

    – Brook

    #157191
    websource
    Participant

    Hi Brook
    Thanks for your Answer. My Problem is that i Need to have These Information on another Website. It could be very difficult to try to use your function..

    Could you help me get my SQL?

    #159471
    Brook
    Participant

    Howdy again websource. I do not think I am understanding what you need to do. I just outlined how you can get the SQL for any query you can perform from your site’s database. Yet you are saying you want to query another sites database. Does that site have events calendar installed? I can only help you with Events Calendar queries. Please let me know. The more detail the better. Right now I do no understand your question so it would be impossible to answer it. Thanks!

    – Brook

    #159528
    websource
    Participant

    Hi Brook
    Thanks for answering. We actually have Events Calendar on our site. But we need some Information (which we want to take with SQL queries from the wordpress database) on another Website.

    We would need a SQL which gives us a list of all Events which are saved in the wordpress database (wp_post, wp_postmeta), or a list of all attendees of the Event selected.

    thanks

    #167731
    Brook
    Participant

    Howdy websource,

    That sounds good. My instructions above will definitely help you to obtain the SQL query (specific to your database) for selecting those events.

    list of all attendees of the Event selected.

    This one is a little bit trickier. In order to get a copy of that SQL if I were you I would use a function/tool like this. Then view the attendee list page with ‘?debug=sql’ in the URL. That should once again get you the exact SQL you need specific for your database.

    – Brook

    #186140
    websource
    Participant

    Hi Brook
    Thanks, but im not getting an exact SQL. All i get is this:
    Load: 41 queries – 0ms – 15.5MB – 532 cache hits / 568
    Display: 80 queries – 0ms – 17.7MB – 1400 cache hits / 1491

    #191618
    Brook
    Participant

    Howdy websource,

    Which method is giving you that data? If it is the third party tool, you might need to contact the developer of it. Or, investigate the use of a similar tool. Like I said, you could use any tool like it. The one I linked was just an example. Unfortunately I am not in a position to support third party tools, for that you would need to contact the author’s support channels.

    I hope that makes sense. I really do want to help you as much as I can. I can certainly help you with advice regarding our API and other plugin related stuff. In the case of your attendance list query our API does not provide a super easy way to extract the query you want. That is why I think it will be easier for you to use a third party tool dedicated towards providing that capability for any WordPress plugin.

    – Brook

    #191798
    websource
    Participant

    Hi Brook
    I took your example and put it in the functions.php of my template Folder. It would be nice if you could advice me getting an attendee list. Even if it isnt that easy for me. Thanks!

    #192140
    Brook
    Participant

    For sure websource. But, I already gave you advice for that, found above. Here is a link to that response. Is that advice incomplete or something?

    – Brook

    #198833
    websource
    Participant

    Hi Brook
    Thanks for your Answer.
    Of course i followed your link. and the result i got with the ?debug=SQL was this:
    Load: 41 queries – 0ms – 15.5MB – 532 cache hits / 568
    Display: 80 queries – 0ms – 17.7MB – 1400 cache hits / 1491
    I took a look at the attendee list at an Event in wordpress..

    How to get to my Goal?
    Thanks Brian

    #201075
    Brook
    Participant

    I am very sorry websource! I linked you to the wrong snippet and gave you the wrong instructions. Hence why you are getting the wrong information. This is the topic I meant to link you to: how-to-display-all-database-queries-made-by-wordpress. Here is some information in the WP Codex on how this works, if you would like to read about it.

    Please let me know if that new snippet works. Make sure to also edit your wp-config as outlined. Cheers!

    – Brook

    #201697
    websource
    Participant

    Hi Brook
    That actually Looks really great, just one Problem.. I Need this for the backend of wordpress, not for the frontside. What could i do to get the Background WordPress SQL’s for the attendee list?
    Thanks

    #201856
    Brook
    Participant

    Good question. I am glad to hear it is working for the front end. I see now why it is not working for the backend. Instead of adding that code to the footer of your theme, add it into the admin footer area. You can do this by hooking into this action, and outputting that <pre>code I previously linked to. Does that make sense? Hopefully we finally got your exactly what you need. If not, let me know. Thanks again for posting!
    – Brook

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘SQL’ is closed to new replies.