RE: [PHP-DB] possible Error in Querydefiniton
Hi John W. Holmes, You can find out why with mysql_error(), but it's probably because you haven't selected a database with mysql_select_db(). now I have this code, but with the same result ? mysql_connect(localhost,root); mysql_select_db(finance); mysql_db_query(finace,INSERT INTO buchung (Bezeichnung) VALUES ('b'))or die(Queryfehler); ? I always become the die-message. I'm using PHP Version 4.0.6 Regards, Ruprecht Ruprecht Helms IT-Service und Softwareentwicklung Tel/Fax: +49[0]7621 16 99 16 email: [EMAIL PROTECTED] Homepage: http://www.rheyn.de - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] possible Error in Querydefiniton
On Monday 07 October 2002 16:16, Ruprecht Helms wrote: Hi John W. Holmes, You can find out why with mysql_error(), but it's probably because you haven't selected a database with mysql_select_db(). now I have this code, but with the same result ? mysql_connect(localhost,root); mysql_select_db(finance); mysql_db_query(finace,INSERT INTO buchung (Bezeichnung) VALUES ('b'))or die(Queryfehler); ? I always become the die-message. I'm using PHP Version 4.0.6 Try adding some error checking code. Have a look at the numerous PHP/MySQL tutorials to find out how it should be done. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Anarchy may not be a better form of government, but it's better than no government at all. */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] possible Error in Querydefiniton
Use mysql_error() in your die() message to find out what the problem was... ---John Holmes... -Original Message- From: root@linux [mailto:root@linux] On Behalf Of Ruprecht Helms Sent: Monday, October 07, 2002 4:17 AM To: John W. Holmes Cc: [EMAIL PROTECTED] Subject: RE: [PHP-DB] possible Error in Querydefiniton Hi John W. Holmes, You can find out why with mysql_error(), but it's probably because you haven't selected a database with mysql_select_db(). now I have this code, but with the same result ? mysql_connect(localhost,root); mysql_select_db(finance); mysql_db_query(finace,INSERT INTO buchung (Bezeichnung) VALUES ('b'))or die(Queryfehler); ? I always become the die-message. I'm using PHP Version 4.0.6 Regards, Ruprecht Ruprecht Helms IT-Service und Softwareentwicklung Tel/Fax: +49[0]7621 16 99 16 email: [EMAIL PROTECTED] 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
RE: [PHP-DB] possible Error in Querydefiniton
Hi John W. Holmes, Use mysql_error() in your die() message to find out what the problem was... ok, typemissmatch was the problem. Thank for the tip. Regards, Ruprecht Ruprecht Helms IT-Service und Softwareentwicklung Tel/Fax: +49[0]7621 16 99 16 email: [EMAIL PROTECTED] Homepage: http://www.rheyn.de - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] possible Error in Querydefiniton
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: [EMAIL PROTECTED] Subject: [PHP-DB] 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: [EMAIL PROTECTED] 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