|
|||
|
Hi
I have gone through the manual with out being able to find any information about how to connect to a Db2 file! here is the section of code I am trying to use Code:
$params = array(
'username' => 'username',
'password' => 'password',
'dbname' => 'systemname'
);
$DB = Zend_Db::factory('Db2' , $params);
$row = array(
'FNAME' => $_POST['fName'],
'LASTNAME' => $_POST['lName'],
'EMAIL' => $_POST['email'],
'USRNAMR' => $_POST['user'],
'PASSWD' => $_POST['pass']
);
$table = 'SHIELDCRM.USERS';
$rowsAffected = $DB->insert($table, $row);
Help is appreciated. Chris... |
|
||||
|
Check webserver logs about what error is it.
Alternatively you can just put at beginning of code: ini_set('display_errors', true); error_reporting(E_ALL); Also, this tutorial is also about DB2. Check it too. Work with XML Data in the Zend FrameworkWork with XML Data in the Zend Framework « View Tutorial*
__________________
Zend Framework Tutorials | Zend Framework Forums | Zend Framework IRC Channel | | Zend Framework Resources | CoreShifter |
|
|||
|
Looks like the forums are being updated as pervious posts seem to have gone? Anyhow I now have a connection but get a problem with the insert
Failed in DB Insert Error occurred in SQL Call Level Interface SQLCODE=-99999 I have looked at the web for an answer but cant find one which seems to relate? Any suggestions? I have tried to review the documentation but they dont really give any pointers. Chris.. |
|
|||
|
OK I think I have solved the problem and I can now access the DB?
I am not sure why either? I tried setting up the MySQL connection as I was so frustrated with this only to find out i5 Zendcore does not ship with the pdo modules at all? Having gone through hours of testing and changing configs I now have something which works! So I am not looking back... Chris... Thanks for the support! |
![]() |
| Thread Tools | |
| Display Modes | |
|
|