Announcement

Collapse
No announcement yet.

HELP !! Really stuked - I did not find any solution till now ;-((((

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • HELP !! Really stuked - I did not find any solution till now ;-((((

    Hi all,
    I beg an urgent help becouse I'm really stucked and I don't know what to do next and customer is waiting for a prompt solution.
    I did an upgrade to last version with fresh installation of SC .13 Php 5.4

    Today I've a problem with my customers about a query did hundreds times before.
    If I run it directly from myphpadmin it works nice. So the query is correct and also the file content.

    I I run it from SC it does nothing .
    Can sc_exec_sql($load_sql); generate problems ? It seems that as it is not run.
    Php ??
    Path has been modified with new v71 path and the file seems correct to.
    I'm really stucked !
    Many thanks

    Down here there is the loaded query showed by SC debug but it seems correct.

    load data local infile 'C:/Program Files (x86)/Scriptcase/v71/wwwroot/scriptcase/file/doc/my_upload_file_fmi/MC_tesserati_X0179DEA_NEW.csv' INTO TABLE members_file_fmi_input FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY ' ' IGNORE 1 LINES (Cod_Meccanografico , Tessera , Nuo_Rin , Cognome , Nome , Sesso , Data_Nascita , Luogo_Nascita , Indirizzo , Cap , Citta , Provincia , Data_Rilascio , Cod_MC , Motoclub , Telefono , Cellulare , Email , Cittadinanza , Residenza , Dirigente, year_card_actual) SET Data_Nascita = str_to_date(Data_Nascita, '%d%m%Y'), Data_Rilascio = str_to_date(Data_Rilascio, '%d%m%Y'), Motoclub = trim(Motoclub), Cod_Meccanografico = trim(Cod_Meccanografico), Dirigente = IF (Dirigente <> '', Dirigente, '') , year_card_actual = concat('20' , LEFT (Tessera, 2)), Provincia = (SELECT `county_ID` FROM `counties` WHERE `code` = Provincia AND language_code = 'it_IT')

    This is the SC code:

    $load_sql = "load data local infile '$npath1'
    INTO TABLE members_file_fmi_input FIELDS TERMINATED BY ','
    OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\r\n'
    IGNORE 1 LINES
    (Cod_Meccanografico , Tessera , Nuo_Rin , Cognome , Nome , Sesso , Data_Nascita , Luogo_Nascita , Indirizzo , Cap , Citta , Provincia ,
    Data_Rilascio , Cod_MC , Motoclub , Telefono , Cellulare , Email , Cittadinanza , Residenza , Dirigente,
    year_card_actual)
    SET Data_Nascita = str_to_date(Data_Nascita, '%d%m%Y'),
    Data_Rilascio = str_to_date(Data_Rilascio, '%d%m%Y'),
    Motoclub = trim(Motoclub),
    Cod_Meccanografico = trim(Cod_Meccanografico),
    Dirigente = IF (Dirigente <> '', Dirigente, '') ,
    year_card_actual = concat('20' , LEFT (Tessera, 2)),
    Provincia = (SELECT `county_ID` FROM `counties`
    WHERE `code` = Provincia AND language_code = '[my_language_CG]')
    ";

    sc_exec_sql($load_sql);
Working...
X