Skip to content

Commit

Permalink
Fix table name in 404s export SQL
Browse files Browse the repository at this point in the history
This corrects the SQL statement to retrieve the number of 404s for export to CSV. The correct table name is 'redirection_404', not 'redirection_logs'.

Per issue: #39
  • Loading branch information
brazenest committed Feb 4, 2015
1 parent 7f6ddd2 commit a251ae6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/log.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ static function export_to_csv() {
fputcsv( $stdout, array( 'date', 'source', 'ip', 'referrer' ) );

$extra = '';
$sql = "SELECT COUNT(*) FROM {$wpdb->prefix}redirection_logs";
$sql = "SELECT COUNT(*) FROM {$wpdb->prefix}redirection_404";
if ( isset( $_REQUEST['s'] ) )
$extra = $wpdb->prepare( " WHERE url LIKE %s", '%'.like_escape( $_REQUEST['s'] ).'%' );

Expand Down

0 comments on commit a251ae6

Please sign in to comment.