Pregunta

I'm using RT index and I'll be using rt_attr_uint to hold unix timestamp, is that ok?

Below is what I mean,

#rtindex
type = rt
path = /var/data/sphinx/idx
rt_attr_uint = timestamp

Then will use php time() function to insert the time to the field, something like the following

$mysqli->query("insert into idx values ( time() ) ");
¿Fue útil?

Solución

Yes, that should work.

$pdo->query('INSERT INTO idx VALUES(' . time() . ')');

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top