Domanda

Ok, quindi voglio fare un inserto preparato come ad esempio:

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

start_time e end_time sono memorizzati nel database come SQL date. Compila il 's in questa prossima dichiarazione:?

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

Quindi, in pratica che cosa ho messo in una chiamata di metodo bind_param per le date di sql ???

È stato utile?

Soluzione

Credo che sarebbe s (stringa).

$stmt->bind_param('iss',
                           $this->sqlid, 
                           $item['start_time'], 
                           $item['end_time'] 
                           );
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top