Try this changes:

$con_id = mysql_connect("localhost", "myusername", "mypassword");
if($con_id){
    mysql_db_query("DocCountry", "INSERT INTO projects (idCreator, name,
comment) VALUES (0, 'sysmsg9.txt', 'Some file')");
    mysql_db_query("DocCountry", "INSERT INTO files (idProject, name,
comment) VALUES (0, 'sysmsg9.txt', 'Some file')");
}
else echo("Connection failed");

-----Mensagem Original-----
De: Chris <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: terça-feira, 6 de março de 2001 16:13
Assunto: Re: [PHP-DB] MySQL - Problem with multiple INSERTs?


> I did change the id fields from TINYINT to INT (that was just a careless
> error), and fixed something else. But I still have the same problems. The
> new table schemas are below, along with the queries that don't work.
>
> I'd love for someone to reproduce the error. As a possible workaround,
> everything seems to be fine when I prime the tables by adding a record;
> they only seem to have a problem when the tables are empty.
>
> Thanks,
> Chris
>
>
>
> mysql_connect("localhost", "myusername", "mypassword");
> mysql_db_query("DocCountry", "INSERT INTO projects (idCreator, name,
> comment) VALUES (1, 'sysmsg9.txt', 'Some file')");
> mysql_db_query("DocCountry", "INSERT INTO files (idProject, name, comment)
> VALUES (1, 'sysmsg9.txt', 'Some file')");
>
> CREATE TABLE projects ( id int(11) NOT NULL auto_increment, timestamp
> timestamp(14), idCreator int(11) DEFAULT '0' NOT NULL, name varchar(80)
NOT
> NULL, comment text NOT NULL, authLevel varchar(32) NOT NULL, PRIMARY KEY
> (id) );
>
> CREATE TABLE files ( id int(11) NOT NULL auto_increment, idProject int(11)
> DEFAULT '0' NOT NULL, idCreator int(11) DEFAULT '0' NOT NULL, name
> varchar(80) DEFAULT '0' NOT NULL, comment text NOT NULL, PRIMARY KEY
(id) );
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to