Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/09/2010, 16:11
virtual19
 
Fecha de Ingreso: julio-2010
Mensajes: 34
Antigüedad: 13 años, 9 meses
Puntos: 0
comosoluciono este error

Warning: dbase_get_record_with_names() [function.dbase-get-record-with-names]: Unable to find database for identifier



<?php
$db = dbase_open('tabla.dbf', 0);
if ($db) {
$número_registros = dbase_numrecords($db);
for ($i = 1; $i <= $número_registros; $i++) {
$fila = dbase_get_record_with_names($db, $i);

echo "Data $i: " . trim($fila['MARCA']) . "\n";

$codigo=$fila['CODIGO'];
$marca=$fila['MARCA'];

$con= mysql_connect("localhost","root","");
$db = mysql_select_db('migra2',$con);
$sql ="INSERT INTO tabla (
codigo,MARCA) VALUES (
' $codigo ',
' $marca'";
$result = mysql_query($sql);
mysql_close($con);

}
}
?>