prefix . "apct_testimonial_detail"; if (isset($testimonial_no) && $testimonial_no == 'all') { $testimonial_number = '9999'; } else if (isset($testimonial_no) && $testimonial_no == $atts['display_num']) { $testimonial_number = $atts['display_num']; } if (isset($order_by) && $order_by == 'id') { $orders_by = 'id'; } else if (isset($order_by) && $order_by == 'author_name') { $orders_by = 'author_name'; } else if (isset($order_by) && $order_by == 'date') { $orders_by = 'date'; } else if (isset($order_by) && $order_by == 'random') { $orders_by = 'RAND()'; } if (isset($order_type) && $order_type == 'ASC') { $order_types = 'ASC'; } else if (isset($order_type) && $order_type == 'DESC') { $order_types = 'DESC'; } $testimonial_details = $wpdb->get_results("SELECT * FROM $apct_table_name ORDER BY $orders_by $order_types LIMIT $testimonial_number"); ?>