Changeset 1348359
- Timestamp:
- 02/11/2016 04:12:30 PM (10 years ago)
- File:
-
- 1 edited
-
nomination-and-voting/trunk/voting.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
nomination-and-voting/trunk/voting.php
r1348338 r1348359 5 5 Description: nomination and voting 6 6 Author: macmonir 7 Version: 1. 08 Author URI: #7 Version: 1.1 8 Author URI: macmonir.com 9 9 */ 10 10 … … 303 303 /*print_r($nominees); 304 304 print_r($nominees_name);die();*/ 305 if($nominees) 306 for($i=0;$i<count($nominees);$i++){ 307 $data = $wpdb->get_results("select nominee_name from ".$wpdb->prefix."nv_nominee where id='".$nominees[$i]."' "); 308 $html.= '<option value="'.$nominees[$i].'">'.$data[0]->nominee_name.'</option>'; 305 $data = $wpdb->get_results("select *,wn.id as id from ".$wpdb->prefix."nv_nominee wn inner join ".$wpdb->prefix."nv_nomination wnm on wn.id=wnm.nomineeid where category='".$_POST['catid']."' group by nomineeid"); 306 307 if(count($data)) 308 foreach($data as $val){ 309 //$data = $wpdb->get_results("select nominee_name from ".$wpdb->prefix."nv_nominee where id='".$nominees[$i]."' "); 310 $html.= '<option value="'.$val->id.'">'.$val->nominee_name.'</option>'; 309 311 } 310 312 die($html); … … 474 476 add_action( 'save_post', 'wpnv_save_indvidual__voting_options' ); 475 477 //metabox 476 add_action( 'add_meta_boxes', 'wpnv_add_custom_box' );478 //add_action( 'add_meta_boxes', 'wpnv_add_custom_box' ); 477 479 478 480 }
Note: See TracChangeset
for help on using the changeset viewer.