tags:

views:

91

answers:

1

Ok so i want to do a prepared insert such as:

prepare("INSERT INTO `analyzeditemsdetails` SET 
                                     analyzeditem_id = ? ,
                                     start_time = ? ,
                                     end_time = ? 
                                      ");

start_time and end_time are stored in the database as sql dates. Fill in the ?'s in this next statement:

$stmt->bind_param('i??',
                           $this->sqlid, 
                           $item['start_time'], 
                           $item['end_time'] 
                           );

So basically what do I put in a bind_param method call for sql dates???

A: 

I think it would be s (string).

$stmt->bind_param('iss',
                           $this->sqlid, 
                           $item['start_time'], 
                           $item['end_time'] 
                           );
stunti