Good day. I would be extremely grateful for the help in finding a solution to select from the index by date. I need to get records, for example, for the past hour.
Before Sphinx, I did this: $result = $pdo->query("SELECT id FROM catalog WHERE date_pub > '{$create_date}' - INTERVAL 1 HOURS"); Variable $create_date contains some creation date, and ideally I need to do a readout from it, not from NOW(), but at least some solution will do for me. Here is just in case part of my .conf-file: source base { type = mysql # connect sql_query_pre = SET NAMES utf8 sql_query_pre = SET CHARACTER_SET_RESULTS=utf8 sql_query_pre = SET CHARACTER SET utf8 sql_query_pre = SET SESSION query_cache_type=OFF sql_query = \ SELECT id,parent_id,date_pub \ FROM catalog sql_attr_uint = id sql_attr_uint = parent_id #sql_field_string = date_pub // tried to work with string sql_attr_timestamp = date_pub } p.s. I do not use any sphinx-libraries. -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users+unsubscr...@googlegroups.com. To post to this group, send email to sphinx-users@googlegroups.com. Visit this group at https://groups.google.com/group/sphinx-users. For more options, visit https://groups.google.com/d/optout.