Created
December 13, 2012 11:01
-
-
Save Spoygg/4275750 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$country = ''; | |
$sql = "select qst.system_name as system_name, qst.question as question, ans.answer as answer from " . EVENTS_ANSWER_TABLE . " ans inner join " . EVENTS_QUESTION_TABLE . " qst on ans.question_id = qst.id where qst.system_name = 'country' and ans.attendee_id = " . $attendee_id; | |
$questions = $wpdb->get_results($sql, ARRAY_A); | |
if ($wpdb->num_rows > 0 && $wpdb->last_result[0]->question != NULL) { | |
foreach ($questions as $q) { | |
$country = $q['answer']; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment