Results 1 to 2 of 2
Thread: Mysql LIKE clause problem
- 07-31-2009, 09:58 AM #1
Member
- Join Date
- Jul 2009
- Posts
- 2
- Rep Power
- 0
Mysql LIKE clause problem
This query does not work. How does i use the LIKE clause with the % together in preparedstatement?Java Code:PreparedStatement s = con.prepareStatement(query); String query = "SELECT * FROM customers WHERE cust_id = ? OR cust_ic = ? OR cust_name LIKE '%'?'%'";
It does not return me any value even the value is there in the DB
HELP PLS!!!
- 07-31-2009, 10:01 AM #2
Member
- Join Date
- Jul 2009
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
Eclipse / Mysql problem
By jdevm in forum EclipseReplies: 0Last Post: 10-09-2008, 01:16 AM -
Using escape sequence with like clause (%)
By Java Tip in forum Java TipReplies: 0Last Post: 02-14-2008, 09:57 AM -
Using escape sequence with like clause (_)
By Java Tip in forum Java TipReplies: 0Last Post: 02-14-2008, 09:55 AM -
mysql driver problem
By mokingsu in forum JDBCReplies: 4Last Post: 01-17-2008, 05:27 PM -
Mysql problem
By Nick15 in forum JDBCReplies: 2Last Post: 05-15-2007, 05:07 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks