Re: Re: newbie lost on data import... part 3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"John W. Holmes" <holmes072000@charter.net> wrote in message
3F35D72F.4090306@charter.net">news:3F35D72F.4090306@charter.net...
> jsWalter wrote:

> >  // Spit it out to double check what I've got
> >  echo '>' . $strDate . '< - >' . $strNum . '< - >' . $strName . '< <p
/>';
>
> So does this echo display anything?

It spits out...

    >1974-01-09< - >4< - >Lost Dog<

Just what it is supposed to spit out.


> What does the Date class do?

A class to ease database work...

    http://pear.php.net/manual/en/package.database.db.intro-auto.php


BTW: A straight SQL call gives the same (lack of) results as well...

   $strSql  = 'INSERT INTO cbs_eps ( eps_id , eps_name , eps_num ,
eps_air_date ) ';
   $strSql .= "VALUES ( ";
   $strSql .=  "'" .      $x             . "'"; // eps_id
   $strSql .=  ",'" .     $strName       . "'"; // eps_name
   $strSql .=  ",'" .     $strNum        . "'"; // eps_num
   $strSql .=  ",'" .     $strDate       . "'"; // eps_air_date
   $strSql .=  ");";

   echo $strSql . '<p />';

   $objResult = $db->query($strSql);

And the SQL generated...

    INSERT INTO cbs_eps ( eps_id , eps_name , eps_num , eps_air_date )

    VALUES ( '4','Lost Dog','102','1974-01-09');

Now, if I paste this into phpmyAdmin it works! :(

Walter




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux