PHP Classes

One "error" needs correction

Recommend this page to a friend!

      CSV to SQL database converter  >  All threads  >  One "error" needs correction  >  (Un) Subscribe thread alerts  
Subject:One "error" needs correction
Summary:should use mysql_real_escape_string()
Messages:2
Author:David Brucas
Date:2006-11-05 07:11:52
Update:2006-11-05 19:01:05
 

  1. One "error" needs correction   Reply   Report abuse  
Picture of David Brucas David Brucas - 2006-11-05 07:11:52
Line 154 of Csv2Db.class.php
$valrow[$tableHeader[$i]] = $col;
should be corrected to
$valrow[$tableHeader[$i]] = mysql_real_escape_string($col);

in order to avoid errors when bringing in csv data with single quotes in a cell.

  2. Re: One "error" needs correction   Reply   Report abuse  
Picture of David Brucas David Brucas - 2006-11-05 19:01:05 - In reply to message 1 from David Brucas
Actually, this should be extracted down to the database abstraction that is being used...