Victor Duchovni wrote:
query = SELECT 1 FROM `insiders` WHERE `address`='%s'

I don't recall "1" being a valid documented access(5) action. Consider
I saw that somewhere, maybe in third-party howtos. Thank you for the notice.

    query = SELECT 'OK' FROM 'insiders' WHERE 'address'='%s'

(the quotes around 'insiders' and 'address' are optional when these are
not reserved words in your SQL database. This said always quoting is a
good habit).

I know that these are optional. And, MySQL uses backticks ` to enclose schema/table/field/function names, not quotes " or apostrophes '.

query = SELECT 'insiders_only' FROM `lists` WHERE CONCAT(`listName`,'@list.domain')='%s' limit 1

This is not efficient, because it can't be indexed. Consider using a
"domain=" filter in the table definition and

        listName = '%u'
I know that it is slow, but didn't know about %u. Where can I look for a list of other substitutes like %s or %u?

Nikita

Reply via email to