Add row to SQL array

What about something like this ? $custom_row = array(array(‘race_id’ => ‘1’, ‘race_name’ => ‘2’, ‘race_date’ => ‘3’)); $races = $wpdb->get_results(” select r.race_name ,r.race_id ,date_format(r.race_date,’%c.%d.%Y’) race_date from race_calendar r order by r.race_date; “, ARRAY_N); $merged_arr = array_merge($custom_row, $races); foreach ( $merged_arr as $race ) { echo $race[‘race_id’] . ‘,’ . $race[‘race_name’] . ‘,’ . $race[‘race_date’]; } … Read more

Same DB for live and dev versions

It would be bad practice to have two sites running off the same database. This is especially true if you were to perform plugin / core updates on one or the other. You would be much better off using something like migrate-db (https://wordpress.org/plugins/wp-migrate-db/) to perform a migration. The maintainers of migrate db are also working … Read more