Home › Forums › Calendar Products › Events Calendar PRO › SQL
- This topic has 13 replies, 2 voices, and was last updated 9 years, 10 months ago by Brook.
-
AuthorPosts
-
February 15, 2014 at 12:39 am #104913websourceParticipant
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 organiserThanks!
February 17, 2014 at 3:42 pm #105576BrookParticipantHowdy 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
May 11, 2014 at 11:28 am #157191websourceParticipantHi 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?
May 13, 2014 at 9:39 am #159471BrookParticipantHowdy 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
May 13, 2014 at 10:11 am #159528websourceParticipantHi 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
May 20, 2014 at 10:17 am #167731BrookParticipantHowdy 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
May 29, 2014 at 2:53 am #186140websourceParticipantHi 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 / 1491May 30, 2014 at 12:41 pm #191618BrookParticipantHowdy 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
May 30, 2014 at 1:37 pm #191798websourceParticipantHi 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!May 30, 2014 at 4:01 pm #192140BrookParticipantFor 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
June 2, 2014 at 10:04 am #198833websourceParticipantHi 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 BrianJune 3, 2014 at 7:09 am #201075BrookParticipantI 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
June 3, 2014 at 11:30 am #201697websourceParticipantHi 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?
ThanksJune 3, 2014 at 12:49 pm #201856BrookParticipantGood 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 -
AuthorPosts
- The topic ‘SQL’ is closed to new replies.