> mysql_query ("INSERT INTO 'footable' (foo1, foo2, foo3,
> foo4, foo5, foo6, foo7)
> VALUES '$foo1', '$foo2', '$foo3', '$foo4',
> '$foo5', '$foo6', '$foo7')"); }
You're also missing an opening bracket after 'VALUES'. The statement should
be:
mysql_query ("INSERT INTO 'foo
On Tuesday 02 November 2004 13:46, Mark Benson wrote:
> mysql_connect (localhost, foouser, foologin);
Always use check the return value of any mysql_*() function you use and make
use of mysql_error().
> $csvfile = file("http://foo.com/foolist.csv";);
If you're using a newer version of PHP you
> > $csvfile = file("http://foo.com/foolist.csv";);
and this
fopen("http://foo.com/foolist.csv";, "r");
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> //
> mysql_connect (localhost, foouser, foologin);
>
> mysql_select_db (footest1);
>
> $csvfile = file("http://foo.com/foolist.csv";);
>
> foreach($csvfile as $line_no => $datastring) {
> $data = explode (",", $datastring);
> $foo1 = $data[0];
> $foo2 = $data[1];
>
Hi, newbie here, go easy on me I'm learning this as I go ;)
Got a bit of teaser here.
//http://foo.com/foolist.csv";);
foreach($csvfile as $line_no => $datastring) {
$data = explode (",", $datastring);
$foo1 = $data[0];
$foo2 = $data[1];
$foo3 = $data[2];