-1
I’m doing a project where I need to create a csv from a mysql table, to create the csv I need to follow the norms of type documents, when I went to write the code I realized that it would possess many if’s for the adaptation of the bank, whether it is due to the amount of fields present in csv, I was wondering if it is a problem to fill the while that fulfills the csv of conditions or there is an easier way to do this.
Example of code start
already processes this in mysql. uses the CASE command for this
– Jasar Orion
I think it’s okay. Because, by your code, you don’t need to use as many if’s like that. Just think that your second and third IF’s you could leave so if($Row['RG_ORGAO'] = "SSPSP"){$c = "TEST";} Else if {$Row['RG_ORGAO'])}{$c = "empty";}. You could also use a ELSE (if applicable) right after, in case your IF and ELSE IF conditions are not met.
– Gato de Schrödinger