views:

174

answers:

1

Hi,

I run PHPunit tests via Apache, ou directly in Eclipse (ZendStudio in fact). All run well via Apache, but under Eclipse i have this error :

zend mysqli statement execute error no data supplied parameters prepared statement

The php version is the same (5.2.10), ZendFramework is 1.9 and here is the code

function isValidProject($sName)
{
$db = Zend_Db_Table::getDefaultAdapter();
$req = $db->prepare('SELECT id_project FROM sys_projects WHERE url_alias=?');
$req->bindParam(1, $sName);
$req->execute();
$row = $req->fetch();
if($row) return $row['id_project']; 
else return FALSE; 
}

I have tried with this way too, with the same result

$req = $db->query('SELECT id_project FROM sys_projects WHERE url_alias=?', array($sName));

Thanks
Cédric

A: 

I've similar errors, where one of the places I was running the code did not have the same module configuration as the other - in that case, mysqli was not installed/available on the server that reported the failure.

examining the output of phpinfo(), run through Apache vs Eclipse should provide some enlightenment.

Alister Bulman