Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-29-2007, 12:33 PM
Junior Member
 
Join Date: Mar 2007
Posts: 2
Default ZF uses 's' for all in bind_param?

When using Mysqli without ZF you need to tell bind_param what the data types are of the parameters you are binding, e.g.
PHP Code:
$stmt $mysqli->prepare("INSERT INTO CountryLanguage VALUES (?, ?, ?, ?)");
$stmt->bind_param('sssd'$code$language$official$percent); 
When I looked for this in the ZF I couldn't find a way to tell it what the data types are. From the code I found it looks like the ZF just labels all parameters as string, 's'.

Zend_Db_Statement_Mysqli, line 172
PHP Code:
// send $params as input parameters to the statement
if ($params) {
    
array_unshift($paramsstr_repeat('s'count($params)));
    
call_user_func_array(
        array(
$this->_stmt'bind_param'),
        
$params
    
);

Am I missing something or could this cause problems, for instance sending integers when the MySQL server is expecting a string?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:52 AM.