RE: [PEAR] Problem with PEAR::MDB

From: Date: Fri, 20 Jun 2003 07:57:52 +0000
Subject: RE: [PEAR] Problem with PEAR::MDB
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-6141@lists.php.net to get a copy of this message
Dear Lukas, Thanks for your help and sorry for not coming back earlier but I was kept far from the WebDev front by a flue :-< I now have 2 questions. 1. Why do you see something with getUserInfo(), while I just see an empty string: Error 1: MDB Error: MDB_manager schema parse error Parser error: "" The code is the following: if(MDB::isError($success)) { echo "Error 1: ".$success->getMessage()."\n". '<br />'; echo $success->getUserInfo(); } 2. I cannot know the length for the ses_value field. If I understand you correctly, I cannot put a default value if I don't put a length. So I removed the default value. However, I still get the same message, infortunately with the empty Parser error: "". Any idea how to solve this? Thank you in advance. Xavier On Tue, 17 Jun 2003 12:01:10 +0200, Lukas Smith wrote: >> From: Xavier Sosnowska [mailto:xso@ifrance.com] >> Sent: Monday, June 16, 2003 6:16 PM >> To: pear-general@lists.php.net >> Subject: RE: [PEAR] Problem with PEAR::MDB >> >> Hi Lukas, >> >> Thanks for your quick reaction. >> >> > $success->getUserinfo() to get more details on the error. >> >> I tried to use getUserinfo() but the error message looks empty: >> MDB Error: MDB_manager schema parse error >> Parser error: "" > > Hmm .. > > I have cut and pasted your xml schema and code and added the out put of > getUserinfo() and I got this: > CREATE TABLE glo_session (ses_id CHAR (32) DEFAULT > 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' NOT NULL,ses_expire INT DEFAULT > 00000000000 NOT NULL,ses_value TEXT DEFAULT 'xxxxxxx' NOT NULL) > [nativecode = BLOB column 'ses_value' can't have a default value] > > So I don't really know where that parse error comes from. > > Blindly assuming you are using MySQL .. > It seems like MySQL doesn't like a default value here: > "BLOB and TEXT columns cannot have DEFAULT values." > > So if you don't specify a length for the ses_value field you will have > to remove the default value. This will need to be documented. > > Thx, > Lukas

« previous php.pear.general (#6141) next »