You can find out why with mysql_error(), but it's probably because you haven't selected a database with mysql_select_db(). ---John Holmes... > -----Original Message----- > From: root@linux [mailto:root@linux] On Behalf Of Ruprecht Helms > Sent: Sunday, October 06, 2002 3:25 PM > To: php-db@lists.php.net > Subject: possible Error in Querydefiniton > > Hi, > > I've some trouble with the following querydefinition > > <? > mysql_connect("localhost","root"); > mysql_db_query("finace","INSERT INTO buchung (Bezeichnung) VALUES > ('b')") > or die ("Query ungültig"); > ?> > > and this is the tablestructur > > +-------------+--------------+------+-----+---------+----------------+-- -- > ------ > | Field | Type | Null | Key | Default | Extra | > Privileges | > +-------------+--------------+------+-----+---------+----------------+-- -- > ----- > | ID | int(11) | | PRI | | auto_increment |... > | Bezeichnung | varchar(30) | YES | | | | > | Art | char(1) | YES | | | | > | Brutto | char(1) | YES | | | | > | Betrag | decimal(8,2) | YES | | | | > | Steuer | int(11) | | | 0 | | > +-------------+--------------+------+-----+---------+----------------+-- -- > ------ > > By execution the script says that the query die. I don't know why. > > ------------------------------------------------------------ > Ruprecht Helms IT-Service und Softwareentwicklung > > Tel/Fax: +49[0]7621 16 99 16 > email: info@rheyn.de > Homepage: http://www.rheyn.de > > ------------------------------------------------------------- > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php