prefix . "wpsp_timetable"; $wh_table = $wpdb->prefix . "wpsp_workinghours"; $wpsp_class_id = intval($_POST['wpsp_class_name']); $noh = intval($_POST['noh']); $sess_template = sanitize_text_field($_POST['sessions_template']); $sql_query = $wpdb->prepare("SELECT heading FROM $tt_table WHERE class_id = %d AND heading != %s",$wpsp_class_id,''); // Get the row using the prepared query. $check_tt = $wpdb->get_row($sql_query, ARRAY_N); //$check_tt = $wpdb->get_row("Select heading from $tt_table where class_id='".esc_sql($wpsp_class_id)."' and heading!=''", ARRAY_N); if (!empty($check_tt)) { $_POST['sessions_template'] = 'available'; $skip_hours = TRUE; } else { $sessions = $wpdb->get_results("SELECT * from $wh_table"); if (empty($sessions)) { echo "
| get_row("Select * from $wpsp_hours_table where id='$sess'"); $ses_info = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpsp_hours_table WHERE id = %s",$sess)); echo esc_html($ses_info->begintime . " to " . $ses_info->endtime); ?> | |
|---|---|
| $ses) { $ses = esc_sql($ses); // $hour_det = $wpdb->get_row("Select * from $wpsp_hours_table where id='$ses'"); $hour_det = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpsp_hours_table WHERE id = %s",$ses)); if ($hour_det->type == "1") { $td_class = "drop"; } else { $td_class = "break"; /* $sub_name=' |