Search code examples
google-fusion-tables

SQL API or Fusion Tables searching


I want to search my table in each column I choose. What am I doing wrong?

this is work
SELECT * FROM TABLE_ID WHERE firstname LIKE '%"+ s +"%' ORDER BY id DESC OFFSET "+ start +" LIMIT "+ localStorage.getItem('delimeter'))

this is not
SELECT * FROM TABLE_ID WHERE firstname LIKE '%"+ s +"%' OR lastname LIKE '%"+ s +"%' ORDER BY id DESC OFFSET "+ start +" LIMIT "+ localStorage.getItem('delimeter'))


Solution

  • The Fusion Table API does not support the 'OR' SQL operator, only 'AND'. You could run two queries and combine the results in the client.