Questions example I found at php.net

Made that change and got:
Unknown column ‘LAMS’ in 'field list’You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘.PNG.png)’ at line 2Unknown column ‘LAMS’ in ‘field list’

However, I wrote:
What do you think?


<?php
if (($handle = fopen("test2.csv", "r")) !== FALSE) {
    while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
        $ref = "'" . $data[0] . "', ";
		$pic = "'" . $data[1] . "'";
		include "connect_to_mysql.php";
		mysql_query("INSERT INTO pic (ref, pic) VALUES (" . $ref . $pic. ")") or die(mysql_error());	
        }
    }
    fclose($handle);

?>