Closed GoogleCodeExporter closed 8 years ago
Did you consider including the missing classes?
Original comment by rc.poi...@gmail.com
on 20 Apr 2013 at 2:51
Hello,
I have the same problems from yesterday. I started a new project with db2php
classes but I get alsways the errors : Fatal Error: Class ....... not found in
... .
I have already cleaned and regenerate all classes (helpers and models from db)
but is always the same.
Can anyone help me to find the problem and fix it?
Thank u in advance!
Giovanni
Original comment by g.piemontese
on 24 Apr 2013 at 2:45
it sounds not good for this library to work properly , because even i succeeded
to fix te above errors , each time i start a new project , the same "nightmare"
is started again and again , which means that the same errors should fixed
again...
Don't you think that you library need a revision and update to fix these errors
only once a time ? don't you think to fix the problems in Helpers Class because
it fails in inclusion and when using CRUD Methods ( Insert , Update , Delete ,
Select or Find ) ????
Original comment by mrad1...@gmail.com
on 2 May 2013 at 10:49
i have made a new php script to resolve this kind of exception , this script
should be included or required even once a time for every database request /
response to perform , here is the code / example :
/* Helpers and Entities to Include */
include('common.inc.php');
/* Entities to Include */
include_once 'classes/Employees.class.php';
/* Connection */
$db=new PDO('mysql:dbname=pfe;host=localhost', 'root', 'mrad');
// query all members (query by example currently only available for PDO!)
$example= new Employees();
foreach (Employees::findByExample($db, $example) as $e) {
echo $e->getLastName() . ':' . $e->getFirstName() . "\n";
}
where the common.inc.php is looking like that :
/*
* Common Inclusion Script
*/
include 'helpers/DFCInterface.class.php';
include 'helpers/DFC.class.php';
include 'helpers/DFCAggregate.class.php';
include 'helpers/DSC.class.php';
include 'helpers/SimpleDatabaseInterface.class.php';
include 'helpers/Db2PhpEntity.class.php';
include 'helpers/Db2PhpEntityBase.class.php';
include 'helpers/Db2PhpEntityModificationTracking.class.php';
the script should be saved in the site root directory and helpers directory is
the directory containing the helpers class files needed for db2php library to
work properly and classes directory is the directory of generated entities /
models from mysql database tables ...
Hope it helps
Original comment by mrad1...@gmail.com
on 3 May 2013 at 11:07
Original issue reported on code.google.com by
mrad1...@gmail.com
on 19 Apr 2013 at 5:11