Bug #4750 [Asn->Csd]: Incomplete CREATE TABLE

From: Date: Tue, 05 Jul 2005 18:56:47 +0000
Subject: Bug #4750 [Asn->Csd]: Incomplete CREATE TABLE
References: 1  Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-6460@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=4750&edit=1 ID: 4750 Updated by: l.alberton@quipo.it Reported By: jruiz at tecsisa dot com -Status: Assigned +Status: Closed Type: Bug Package: Documentation PHP Version: 4.3.7 Assigned To: quipo New Comment: > I am using MS SQL Server!! (db container) ah, that's something you didn't say before ;-) Anyway, I've removed the seq table definition from the tutorial since it's automatically created on demand, and the definition in the docs is only valid for mysql. If your mail_queue table is empty, drop the mail_queue_seq table and let the script create it transparently, it will do the job correctly for your dbms. The change in the docs will be visible next sunday. Previous Comments: ------------------------------------------------------------------------ [2005-07-05 14:39:19] jruiz at tecsisa dot com I am using MS SQL Server!! (db container) In mssql.php function nextId $result = $this->query("INSERT INTO $seqname (vapor) VALUES (0)"); Expects to insert in a field named "vapor". I fixed by adding a field named vapor in the MS SQL DB. ------------------------------------------------------------------------ [2005-07-05 14:30:52] l dot alberton at quipo dot it I don't understand which field you are talking about... the "id" field is the only one needed by PEAR::DB. I've removed the table creation from the docs, it's done automatically. If you are using the MDB container, the field name is "sequence" (not "id"), so the seq table is not compatible. That's another reason not to create the seq table manually. Can you send me the exact error message you get? ------------------------------------------------------------------------ [2005-07-05 13:56:05] jruiz at tecsisa dot com The tutorial on the web page: http://pear.php.net/manual/en/package.mail.mail-queue.mail-queue.tutorial.php has the error, because it creates the table with one field. When Mail_queue finds there is a table called mail_queue_seq it doesn't create it again, instead it tries to use it... but can't insert in a non existent column. ------------------------------------------------------------------------ [2005-07-05 13:51:54] l dot alberton at quipo dot it Sorry I don't understand... actually the seq table is created automatically, so you don't need to create it... ------------------------------------------------------------------------ [2005-07-05 12:52:44] jruiz at tecsisa dot com Description: ------------ Tutorial for Mail_queue has two create table. The second one CREATE TABLE mail_queue_seq needs another field (vapor) as used by nextId function in db. Reproduce code: --------------- CREATE TABLE mail_queue_seq ( id int(10) unsigned NOT NULL auto_increment, PRIMARY KEY (id) ); ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=4750&edit=1

« previous php.pear.doc (#6460) next »