/***************************************************************
** Delimeted file to SQL conversion method
**
** Author...: leapinglangoor [ leapinglangoor@yahoo.co.in ]
** Updated..: 19 Apr 2005
** Version..: v 1
**
** Usernotes: To use this script, you must have a table that
** has as many fields as in the text file which
** needs to be pass with the arguments (See below)
**
** Example Text file:
**
** leapinglangoor leapinglangoor@gmail.com
** name myname@myemail.com
**
** Now the database table should have two fields one
** for the name i.e. leapinglangoor or name
** and another for the email!
**
***************************************************************/
James Salinas wrote :1316
In the function declaration, you have typo`s:
function convert( $delimeter = `\t`, $filename,
$db[`host`],
$sb[`user`],
$db[`passwd`],
$dv[`database`],
$db[`table`]
) {
should be:
$db[`host`],
$db[`user`],
$db[`passwd`],
$db[`database`],
$db[`table`]
leapinglangoor wrote :1317
Uhmmm.... I see no diffrence. Can you be more clear :?
James Salinas wrote :1318
look at variable names
$db[`host`], <-ok
$sb[`user`], <-wrong
$db[`passwd`], <-ok
$dv[`database`], <-wrong
$db[`table`] <-ok