Pregunta

Ok, así que quiero hacer un inserto de preparados tales como:

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

hora_inicial y hora_final se almacenan en la base de datos como fechas sql. Rellene el 's en este próximo estado de cuenta:?

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

Así que básicamente lo puedo poner en una llamada al método bind_param para fechas sql ???

¿Fue útil?

Solución

Creo que sería s (cadena).

$stmt->bind_param('iss',
                           $this->sqlid, 
                           $item['start_time'], 
                           $item['end_time'] 
                           );
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top