Title: SQL
Last modified: July 27, 2023

---

# SQL

 *  Resolved [Andrzej Klasén](https://wordpress.org/support/users/bibeldans/)
 * (@bibeldans)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/sql-8/)
 * Hi again!
 * Maybe it’s a problem with my MySQL Server:
 * MySQL Version 10.5.21 MariaDB Server
 * archive.php
 *     $sql = “CREATE OR REPLACE VIEW `{$wpdb->prefix}redirection_logs_view` AS
 *       SELECT * FROM `{$wpdb->prefix}redirection_logs`
 *       UNION ALL
 *       SELECT * FROM `{$wpdb->prefix}redirection_logs_archive`“;
 * #1222 – The used SELECT statements have a different number of columns
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsql-8%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [Andrzej Klasén](https://wordpress.org/support/users/bibeldans/)
 * (@bibeldans)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/sql-8/#post-16927382)
 * SQL Statement:
 * SELECT * FROM wp_redirection_logs UNION ALL SELECT * FROM wp_redirection_logs_archive;
 *  Plugin Author [mrdenny](https://wordpress.org/support/users/mrdenny/)
 * (@mrdenny)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/sql-8/#post-16929040)
 * I know the problem. Back when I created the view the columns would have matched.
   I’m out for a view days, but I’ll put together a new CREATE VIEW script and release
   an update which includes it.
 *  Plugin Author [mrdenny](https://wordpress.org/support/users/mrdenny/)
 * (@mrdenny)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/sql-8/#post-16948579)
 * I just uploaded a new version of the plugin which has a new version of the view.
   
   Sorry it took so long, every time I remembered that I needed to do this I was
   away from my computer.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘SQL’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/redirection-reporting.svg)
 * [Redirection Reporting](https://wordpress.org/plugins/redirection-reporting/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/redirection-reporting/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/redirection-reporting/)
 * [Active Topics](https://wordpress.org/support/plugin/redirection-reporting/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redirection-reporting/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redirection-reporting/reviews/)

## Tags

 * [union](https://wordpress.org/support/topic-tag/union/)

 * 3 replies
 * 2 participants
 * Last reply from: [mrdenny](https://wordpress.org/support/users/mrdenny/)
 * Last activity: [2 years, 9 months ago](https://wordpress.org/support/topic/sql-8/#post-16948579)
 * Status: resolved