Menu

#1084 (ok 3.2.0) Load Data infile backquoted column names

Needs_decision
fixed
1
2013-06-11
2008-03-27
Terry
No

I frequently copy then past backquoted column names from a sql input screen of a table (highlight columns on the right and then << will insert backquoted and comma delimited field names into sql statement) into the IMPORT Load csv file screen. Current ldi.php will produce error because it adds additional backquotes to the column name list I provided, which is already backquoted.

Solution:

Add the following code line just after line 93
and Just Prior to:

if (strlen($ldi_columns) > 0) {
$sql .= ' (';......
------------------------------------

// remove backquotes and spaces so you can cut and past the fields names into the ldi function...

$ldi_columns=str_ireplace('`',''
,str_ireplace(' ','',$ldi_columns) );

Discussion

  • Michal Čihař

    Michal Čihař - 2008-11-30
    • assigned_to: nobody --> nijel
     
  • Michal Čihař

    Michal Čihař - 2008-11-30
    • priority: 5 --> 1
    • summary: Load Data infile backquoted column names --> (ok 3.2.0) Load Data infile backquoted column names
    • status: open --> open-fixed
     
  • Michal Čihař

    Michal Čihař - 2008-11-30

    Implemented in SVN, thanks for suggestion.

     
  • Marc Delisle

    Marc Delisle - 2009-06-15
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed