$tsvhandle = fopen($tsvfile, 'r');
while (($data = fgetcsv($tsvhandle, 1000, ";")) !== FALSE) {
$result = mysql_query("SELECT `post_id` FROM `charvest_postmeta` WHERE `meta_key` = '_sku' AND `meta_value` = '".$data[2]."'") or die($result."<br/><br/>".mysql_error());
while($row = mysql_fetch_array($result)){
echo $row['post_id']. "</br>";
}
}
我收到“ PHP Notice: Undefined offset: 2”,但我不明白问题出在哪里。请帮我解决这个问题。
谢谢!