Lesson 3 SQL Search problem
Posted: Sun Mar 30, 2014 12:12 am
SQL Newbie question:
When implementing lesson 3 database search on (Win I get errors:
1)SQLite: search string is "go" with sample database
Code is:
put "SELECT firstname,lastname,contact_id FROM contacts" into tSQLQuery
put "WHERE firstname LIKE '%" & tSearchText & "%' OR lastname LIKE '%" & tSearchText & "%'" after tSQLQuery
ERROR is:"revdberr,Database Error: near "LIKE": syntax error"
2)My SQL: search string is "go" with sample database
Code is same as above
ERROR is: revdberr,You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIKE '%go%' OR lastname LIKE '%go%'' at line 1
3) Search with the Web MySQL code works fine.
Code:
put url ("http://techsupport.on-rev.com/cloudtest ... lc?search=" & tSearchText) into tContacts
Any help is appreciated.
Jack
When implementing lesson 3 database search on (Win I get errors:
1)SQLite: search string is "go" with sample database
Code is:
put "SELECT firstname,lastname,contact_id FROM contacts" into tSQLQuery
put "WHERE firstname LIKE '%" & tSearchText & "%' OR lastname LIKE '%" & tSearchText & "%'" after tSQLQuery
ERROR is:"revdberr,Database Error: near "LIKE": syntax error"
2)My SQL: search string is "go" with sample database
Code is same as above
ERROR is: revdberr,You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIKE '%go%' OR lastname LIKE '%go%'' at line 1
3) Search with the Web MySQL code works fine.
Code:
put url ("http://techsupport.on-rev.com/cloudtest ... lc?search=" & tSearchText) into tContacts
Any help is appreciated.
Jack