Correct query not parsing / displaying ?
-
Hello. I have trouble with placing following PHP. Query works perfect in myPhpAdmin. I would be very appreciative for help ??
<?php global $wpdb; $current_user = wp_get_current_user(); // $my_user = $current_user->user_email; $result = $wpdb->get_results(" SELECT DISTINCT Numer AS 'Numer um' FROM ( SELECT data_id, MAX( CASE WHEN name = 'submit_time' THEN value END) AS Czas, MAX( CASE WHEN name = 'LoggedUser' THEN value END) AS Adres, MAX( CASE WHEN name = 'numer_um' THEN value END) AS Numer FROM wp_cf7_vdata_entry where cf7_id = 330 GROUP BY data_id DESC ) AS EXM "); foreach($result as $row) { echo '<p>'.$row->value.'</p>'; } ?> //WHERE Adres = "[email protected]"
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Correct query not parsing / displaying ?’ is closed to new replies.