Phonebook Import Issue on FOP2 2.29
Hi, Thanks for this really nice FOP2 ...
I got an issue when importing csv on phonebook. it said 15 record imported but when check on db it's there with empty value on each field.
This does not happen on 2.28 though. Only on 2.29
Can you please give me a clue on this ? ... is this a bug or some changes need to be done on server ?
Thanks
I got an issue when importing csv on phonebook. it said 15 record imported but when check on db it's there with empty value on each field.
This does not happen on 2.28 though. Only on 2.29
mysql> select * from visual_phonebook;
+----+-----------+----------+---------+--------+--------+-------+---------+---------+---------+
| id | firstname | lastname | company | phone1 | phone2 | owner | private | picture | context |
+----+-----------+----------+---------+--------+--------+-------+---------+---------+---------+
| 63 | | | | | | | | NULL | |
| 62 | | | | | | | | NULL | |
| 61 | | | | | | | | NULL | |
| 59 | | | | | | | | NULL | |
| 60 | | | | | | | | NULL | |
| 58 | | | | | | | | NULL | |
| 56 | | | | | | | | NULL | |
| 57 | | | | | | | | NULL | |
| 55 | | | | | | | | NULL | |
| 53 | | | | | | | | NULL | |
| 54 | | | | | | | | NULL | |
| 51 | | | | | | | | NULL | |
| 52 | | | | | | | | NULL | |
| 49 | | | | | | | | NULL | |
| 50 | | | | | | | | NULL | |
+----+-----------+----------+---------+--------+--------+-------+---------+---------+---------+
15 rows in set (0.00 sec)
Can you please give me a clue on this ? ... is this a bug or some changes need to be done on server ?
Thanks
Comments
Thanks for your reply, i have attach the csv file for testing.
Really appreaciate it ...
Thanks for the help
Turns out that mysql_real_escape_string doesn't return any data on my system (for whatever reason).
When I change the following line in fop2/lib/dbgrid.php:
FROM:
$misdatos[]=mysql_real_escape_string(trim($columns[$nro]));
TO:
$misdatos[]=mysql_escape_string(trim($columns[$nro]));
The import succeeds.
Thanks for the tips ... it works ...