Re: questions about PEAR

From: Date: Tue, 18 May 2004 17:30:42 +0000
Subject: Re: questions about PEAR
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-12572@lists.php.net to get a copy of this message
Hi Karlis, I can't answer your PEAR-related questions but would like to point out a bug in your script: The following line $db -> DB::conncet(mysql://....); should be: $db =& DB::conncet(mysql://....); Please check your script. Regards, Torsten >>> "Karlis Vesters" <karlisveshters@inbox.lv> wrote in message news:40AA2E64.000001.02336@ABCDE... Dear Sir or Madame, I have written you - I am a studen who is writing a course paper about PEAR. I am trying to use a PEAR class DB. But I have a problem with using query. To explain what kind of problem I have I will show you an example of the main idea: $db -> DB::conncet(mysql://....); $table_name = 'table_x'; $insert = "insert into $table_name (col) values ('x')"; $db->query($insert); ..... $select = "select col from $table_name"; $result = $db->query($select); $query = $db->query($select); if ($db->isError($query)) { die ($query->getMessage()); } if ($db->numRows($query) > 0) { while($fetch = $query->fetchRow(DB_FETCHMODE_OBJECT)) { echo $fetch->col . ';'; } Without inserting 'x' everything works correctly and 'a; b; c;' appear. But if I insert a new value 'x' I get the same result 'a; b; c;' without a new value at first. Only after page refreshing I get 'a;b;c;x;'. It is the same when using transactions. But I am not using transactions. My database is mysql-4.0.18-win, and tables are with type MyIsam. Maybe you could explain me where the problem is? I have a few more questions: 1) have you any ither presentations ( graphs or other types) about different dependence of PEAR classes (global (between big classes) and local (for each big PEAR class). 2) How does the use of different classes effect speed of application? 3) is PEAR project growing (number of people who works on the project) and why there is so less documentation even on a most used classes 4) why is it better to use installation instead of simple uncompressing package to the needed directory Thank you in advance, Sincerely Yours, Karlis Veshters

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