Re: [PHP-DB] insert into mysql-db from csv-file

2005-01-18 Thread Ruprecht Helms
Hi John, I want to read a csv-file and import the datas into a mysql-db. How do I make this. A little scriptexaple in php would be helpfull. Why not just LOAD DATA INFILE from MySQL? No need to involve PHP at all, really... I think the command you also can write in the mysql_db_query-Command.

Re: [PHP-DB] insert into mysql-db from csv-file

2005-01-17 Thread John Holmes
Ruprecht Helms wrote: I want to read a csv-file and import the datas into a mysql-db. How do I make this. A little scriptexaple in php would be helpfull. Why not just LOAD DATA INFILE from MySQL? No need to involve PHP at all, really... -- ---John Holmes... Amazon Wishlist:

RE: [PHP-DB] INSERT into mysql from dynamic drop down

2004-01-07 Thread Aleks @ USA.net
: Wednesday, January 07, 2004 1:37 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: [PHP-DB] INSERT into mysql from dynamic drop down Hi all, Right now i would like to INSERT the values from a dynamic drop down menu into mysql database but encountered some problem here. Values in the drop

[PHP-DB] INSERT into mysql from dynamic drop down

2004-01-06 Thread irinchiang
Hi all, Right now i would like to INSERT the values from a dynamic drop down menu into mysql database but encountered some problem here. Values in the drop down menu are retrieved from DB as follows: SNIP SELECT NAME=tutor_name CLASS=textarea ? $sql = mysql_query(SELECT DISTINCT

[PHP-DB] insert problem mysql

2001-09-05 Thread shi
Hi I'm trying to insert a text into a MYSQL DB, and here is the problem. If the text looks like this x xx x x xxx 'xxx xxx then PHP interprets the text following the ' as an sql statement. Does anyone know how to overcome this problem. Thank you Shimon -- PHP Database Mailing List

[PHP-DB] INSERT into mySQL over PHP (internet)

2001-05-03 Thread Nils Wetterich
Hi NG Now that I finally realy work with the combination mySQL PHP on a Windows-machine I began to just love it. There's only one problem I still have: How can I INSERT data from a HTML-form to the database on the server? I'd like to have some kind of a GUI on the internet so I could administer

Re: [PHP-DB] INSERT into mySQL over PHP (internet)

2001-05-03 Thread Russ Michell
I'd like to have some kind of a GUI on the internet Could you not use phpMyAdmin?? Download it for free from http://www.phpwizard.net/projects/phpMyAdmin/ Cheers. Russ On Thu, 3 May 2001 15:43:11 +0200 Nils Wetterich [EMAIL PROTECTED] wrote: Hi NG Now that I finally realy work with the

Re: [PHP-DB] insert into mysql

2001-01-29 Thread Tom Carter
On Thu, 25 Jan 2001, Darryl Friesen wrote: It still didn't work. just says unable to add part $sql = "INSERT INTO ecomm (ID,part) VALUES ('$sid','$spp')"; Another thought: Are ID and part character data of some sort? If not (i.e. if ID is an int) then remove the single

Re: [PHP-DB] insert into mysql

2001-01-29 Thread Darryl Friesen
$sql = "INSERT INTO ecomm (ID,part) VALUES ('$sid','$spp')"; Another thought: Are ID and part character data of some sort? If not (i.e. if ID is an int) then remove the single quotes. A trivial point this, but if you insert values in ' into a mysql int column then MySQl still

[PHP-DB] insert into mysql

2001-01-25 Thread Robert
//--- Add part -- if($act=="ADD"){ $sql="INSERT INTO ecomm (ID,part) VALUES ('$sid','$spp'),$db"; if(! @mysql_db_query("$sql")){echo("Unable to add part.");mysql_close($db);exit();} } Why does this not work?

RE: [PHP-DB] insert into mysql

2001-01-25 Thread Dave Fudge
$dbname -Original Message- From: Robert [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 25, 2001 3:07 PM To: Darryl Friesen; [EMAIL PROTECTED] Subject: Re: [PHP-DB] insert into mysql It still didn't work. just says unable to add part $db = mysql_connect("tech2000", "

Re: [PHP-DB] insert into mysql

2001-01-25 Thread Darryl Friesen
It still didn't work. just says unable to add part $sql = "INSERT INTO ecomm (ID,part) VALUES ('$sid','$spp')"; Another thought: Are ID and part character data of some sort? If not (i.e. if ID is an int) then remove the single quotes. - Darryl

Re: [PHP-DB] insert into mysql

2001-01-25 Thread Robert
o: "Robert" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, January 25, 2001 2:26 PM Subject: Re: [PHP-DB] insert into mysql It still didn't work. just says unable to add part $sql = "INSERT INTO ecomm (ID,part) VALUES ('$sid','$spp')"; Another thought: Are ID a

[PHP-DB] insert into mysql

2001-01-25 Thread Robert
Warning: Supplied argument is not a valid MySQL-Link resource in c:\inetpub\wwwroot\rfq.php on line 16 Unable to add part //--- Add part -- if($act=="ADD"){ $sql="INSERT INTO ecomm (ID,part) VALUES $sql.="('$sid','$spp')"; if(!

[PHP-DB] insert in mysql

2001-01-25 Thread Robert
ignore that last one :) I goofed... Still not working right though if($act=="ADD"){ $sql="INSERT INTO ecomm (ID,part) VALUES ('$sid','$spp')"; if(! mysql_query('$sql')){echo("Unable to add part.");mysql_close($db);exit();} } just gives me "Unable to add part"

[PHP-DB] insert in mysql

2001-01-25 Thread Robert
This link is passed to the shopping cart type script where I want to put the spp and the sid into the database. http://tech2000/rfq.php?spp=MC68020RC12Tpkg=PGAmfc=MOTact=ADDsid=583607ba7b565b6d699da58d7c7fe9ab script language='php' // Connect to Database