I have imported some tables from my online wordpress database to my local to work on.

However now I am getting some weird sql errors that I don't get online.

I can see that the code of the plugin I am working on has some references (aliases?) that don't appear to reference anything that I see when I do a search:

$result = $wpdb->get_row( 'SELECT re.*
                                    FROM ' . EVENT_ESPRESSO_RECURRENCE_TABLE . ' re
                                    INNER JOIN ' . EVENTS_DETAIL_TABLE . ' ed
                                    ON re.recurrence_id = ed.recurrence_id
                                    WHERE re.recurrence_id = ' . $recurrence_id .
                        ' ORDER BY ed.start_date ASC
                                    LIMIT 1', ARRAY_A );

What is table 're'? In re.recurrence_id?

  • I can't see how this question serves any use to the community here, sorry voting to close (note: the constants refer to the table names, find them and you'll find what you're looking for). – Mark Duncan Jul 26 '11 at 16:15
  • By constants do you mean what's written in caps or the part labelled 're'? – redconservatory Jul 26 '11 at 16:33

're' is the alias you give to EVENT_ESPRESSO_RECURRENCE_TABLE.

The error you're seeing is probably because the EVENT_ESPRESSO_RECURRENCE_TABLE constant isn't defined.

Do a var_dump( $wpdb->last_query ) just below that code to see the final SQL statement.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.