zero-perfoliate
zero-perfoliate

Author Topic: newbie needs extreme help  (Read 549 times)

Offline djdellux

  • New PHP Members
  • Posts: 2
  • Karma: +0/-0
newbie needs extreme help
« on: December 05, 2008, 09:53:04 AM »
i am very new to php and completely new to sql/sqlite. i am makeing a viewer for a csv file and have hit a wall sotosay. here is my code so far

Code: [Select]
<?php
        $dbvoip 
sqlite_open('voip.sqlite');

        if (
$dbvoip == false)
        {
                die (
'Unable to open database');
        } else {
                echo 
'Database created.';
        }

$dbinfo=file("master.csv");

foreach ($dbinfo as  $line) {
    
$dbquery explode(","$line);
    
    
print_r($dbquery);


$dbquery "INSERT INTO voip (C0, number1, number2, type, number3, linetype, c1, dial, c2, date1, date2,
   date3, c3, c4, anw, DOCUMENTATION, unix, C17)
   VALUES ($data)"
;
   
    
 }
           
sqlite_close($dbvoip)

?>

 

now my question is how do i insert info into the db considering i have created it and put it into an array form???

thanks in advance everyone

 

zero-perfoliate