PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
MDB2 - pb with autoexecute

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Database
View previous topic :: View next topic  
Author Message
riccco



Joined: 18 Nov 2007
Posts: 3

PostPosted: Mon Nov 19, 2007 10:38 pm    Post subject: MDB2 - pb with autoexecute Reply with quote

Hello again,

I have this snippet that don't work :
Code:

$itm = array (
         'pk_fetched' =>"",
         'titre' => "test",
         'description' => "zest",
         'link' => "zest",
         'date' => "2007-11-19T10:30:29Z",
         'lat' => "38.8969114742295",
         'long' => "-77.0316696166992"
         );

$table_name = 'fetched';
$mdb2->loadModule('Extended');

ricco
$affectedRows = $mdb2->extended->autoExecute($table_name, $itm, MDB2_AUTOQUERY_INSERT, null);   
if (PEAR::isError($affectedRows)) {
  die($affectedRows->getMessage() . ', ' . $affectedRows->getDebugInfo());
}


But mysql answer is : 'INSERT INTO fetched (pk_fetched, titre, description, link, date, lat, long) VALUES (?, ?, ?, ?, ?, ?, ?)'

Somebody have an idea of the problem ?
thanks by advance
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1053

PostPosted: Tue Nov 20, 2007 10:50 am    Post subject: Reply with quote

Does the die() call in the error check output something? If yes, what is the output?

It might also help to add the following lines at the beginning of your code to improve the error reporting of PHP for debugging:
Code:

error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once 'PEAR.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Database All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software