You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hola a todos, hoy entro en esta productiva comunidad de desarrollo por primera vez, para suplirles con lo que pueda y , como no, poder enriquecerme de vuestra sabiduría.
Quisiera saber si alguien ha usado el componente mencionado en el título (Goodby/csv) para PHP, debido a que tengo un problema con el mismo. Les explico, estoy desarrollando una aplicacion que gestiona licencias de software donde los usuarios se cargan mediante ficheros csv a una BD MySQL y para ello quiero contemplar que cada vez que subo un fichero con los profesores, se compruebe cada registro (fila del csv) para ver si existe en la BD y no duplicarlo. El problema es que el componente parece ser que hace un bucle impícito de todas las sentencias que están delimitadas (csv) y en ese intervalo no puedo comprobar cada fila para dicho propósito. Les paso el código a ver si podéis verlo con claridad.
Esta es una de la funciones que se encargan de lo comentado:
introducir el código aquí
public function InsertarProfesores($ficheroTmp){
try{
$config = new LexerConfig();
$config
->setDelimiter(";") // Customize delimiter. Default value is comma(,)
->setEnclosure("'") // Customize enclosure. Default value is double quotation(")
->setEscape("\") // Customize escape character. Default value is backslash()
->setToCharset('UTF-8') // Customize target encoding. Default value is null, no converting.
Hello everyone, today I enter this productive community of development for the first time, to supply them with what I can and, of course, to be able to enrich myself with your wisdom.
I would like to know if someone has used the components mentioned in the title (Goodby / csv) for PHP, because I have a problem with it. I explain, I am developing an application that manages software licenses where users are uploaded using csv files to a MySQL BD and for this I want to contemplate every time I upload a file with the teachers, check each record (csv row) to see If it exists in the DB and does not duplicate it. The problem is that the component seems to be doing an impractical loop of all the statements that are bounded (csv) and in that interval I can not check each row for that purpose. The code to see if you can see it clearly.
This is one of the functions that are responsible for what is commented:
public function InsertarProfesores($ficheroTmp){
try{
$config = new LexerConfig();
$config
->setDelimiter(";") // Customize delimiter. Default value is comma(,)
->setEnclosure("'") // Customize enclosure. Default value is double quotation(")
->setEscape("") // Customize escape character. Default value is backslash()
->setToCharset('UTF-8') // Customize target encoding. Default value is null, no converting.
If you can help me I would greatly appreciate it because it is for a job and I need to solve it as soon as possible, I Only have today to solve this issue!
Activity
Mohicanorr commentedon Jun 11, 2017
Re edit, in English:
Hello everyone, today I enter this productive community of development for the first time, to supply them with what I can and, of course, to be able to enrich myself with your wisdom.
I would like to know if someone has used the components mentioned in the title (Goodby / csv) for PHP, because I have a problem with it. I explain, I am developing an application that manages software licenses where users are uploaded using csv files to a MySQL BD and for this I want to contemplate every time I upload a file with the teachers, check each record (csv row) to see If it exists in the DB and does not duplicate it. The problem is that the component seems to be doing an impractical loop of all the statements that are bounded (csv) and in that interval I can not check each row for that purpose. The code to see if you can see it clearly.
This is one of the functions that are responsible for what is commented:
public function InsertarProfesores($ficheroTmp){
try{
$config = new LexerConfig();
$config
->setDelimiter(";") // Customize delimiter. Default value is comma(,)
->setEnclosure("'") // Customize enclosure. Default value is double quotation(")
->setEscape("") // Customize escape character. Default value is backslash()
->setToCharset('UTF-8') // Customize target encoding. Default value is null, no converting.
If you can help me I would greatly appreciate it because it is for a job and I need to solve it as soon as possible, I Only have today to solve this issue!
regards