문제

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() ) ");
도움이 되었습니까?

해결책

Yes, that should work.

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top