[FIX] Missing quotes in matches import
-
File: admin.php
Row: 1194Problem: importing matches from CSV doesn’t set the correct date (“N/A” imported)
Reason: the “date” field in query is not surrounded by quotes, so MySQL could misunderstand it
$sql = “INSERT INTO {$wpdb->leaguemanager_matches} (date, home_team, away_team, match_day, location, league_id, season, final, custom,
group
) VALUES (‘%s’, ‘%s’, ‘%s’, ‘%d’, ‘%s’, ‘%d’, ‘%s’, ‘%s’, ‘%s’, ‘%s’)”;Fix: just surround date with quotes
$sql = “INSERT INTO {$wpdb->leaguemanager_matches} (
date
, home_team, away_team, match_day, location, league_id, season, final, custom,group
) VALUES (‘%s’, ‘%s’, ‘%s’, ‘%d’, ‘%s’, ‘%d’, ‘%s’, ‘%s’, ‘%s’, ‘%s’)”;
- The topic ‘[FIX] Missing quotes in matches import’ is closed to new replies.