I have a table
"search_log "
that logs all search by client
here are some of the fields query_date , query_result, query_code
here is the thing as the owner of the site I want to be able to see a user that searched four times in a row that has no result to be able to save them and stop the from being disappointed
if a client searches and there is no result it automatically inserts a data like this
query_date = NOW(),
query_result = 0,
query_code = LIKE '%querystring%'
now i want to be able to find a client that has four "CONSECUTIV E" searches in a row that has four zero "0" query_result
i am looking for something like this
query_date = 10/11/2001
query_result = 0
query_date = 10/11/2001
query_result = 0
query_date = 10/11/2001
query_result = 0
query_date = 10/11/2001
query_result = 0
they have to be consecutive
by the way my table is having 3 million records so Can you please advice me a query that can run faster
"search_log "
that logs all search by client
here are some of the fields query_date , query_result, query_code
here is the thing as the owner of the site I want to be able to see a user that searched four times in a row that has no result to be able to save them and stop the from being disappointed
if a client searches and there is no result it automatically inserts a data like this
query_date = NOW(),
query_result = 0,
query_code = LIKE '%querystring%'
now i want to be able to find a client that has four "CONSECUTIV E" searches in a row that has four zero "0" query_result
i am looking for something like this
query_date = 10/11/2001
query_result = 0
query_date = 10/11/2001
query_result = 0
query_date = 10/11/2001
query_result = 0
query_date = 10/11/2001
query_result = 0
they have to be consecutive
by the way my table is having 3 million records so Can you please advice me a query that can run faster
Comment